Xpode.com        Click here to Print this article.

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))


Contributed by:
Rohit kakria
I am software developer, moderator of xpode.com

Resourse address on xpode.com

Click here to go on website