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 3256 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles: No related article
Related Interview Questions: No related interview question