Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     

How can you select random value for every iteration from a web-list? (Important for interviews)

First get the Items count from the List and Use the RandomNumber() function to get the random Index value. The below code will work

ItemsCount = Browser("Browsername").Page("PageTile").WebList("WebListName").GetROProperty("items count")
Browser("Browsername").Page("PageTile").WebList("WebListName").Select ("#" & RandomNumber(0,ItemsCount))

Share this article   |    Print    |    Article read by 3065 times
Rohit kakria
I am software developer, moderator of
Related Articles: No related article
Related Interview Questions: No related interview question