Hi, How to select random data from a drop-down?

How to select random data from a drop-doown list ?
Thank You

1 Like

Thank You Marek Melocik :slight_smile:

`int optionListLength = 10
Random rand = new Random()
int index = rand.nextInt(optionListLength + 1)

WebUI.selectOptionByIndex(testObject, index)`

2 Likes

What is testObject?

Is this also applicable when I have Span instead of Select?