Katalon Analytics (beta) – Bringing new insights into test reports. Learn more!

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

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

Comments

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

    WebUI.selectOptionByIndex(testObject, index)
  • Thank You Marek Melocik :)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion