how can you select random value for every iteration from a
weblist

Answer Posted / amarendra kothuru

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

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is debugging? How you debug your script?

612


i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression

1029


how will you load the test cases in ddt?

1600


how can i pass a "cript"as a parameter in to a function

1462


how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

1452






Explain how qtp identifies object?

613


Explain the types of object repository?

560


Where we can use the analog mode and where we can use the low – level mode?

570


What are the key points to create a framework in QTP for oracle forms?

1818


how to find that tools work well with your existing system?

1406


How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet

1541


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

1646


how many maximum number of virtual users we can create?

1574


What is the difference in testing a client-server application and a web application?

588


Define object spy ?

568