how can you select random value for every iteration from a
weblist
Answer Posted / vijay
Dim ListCount
ListCount =
Browser("Name").Page("Name").WebList("Name").GetROProperty("items
count")'Count the items in the list
ListCount = ListCount-1 'index value starts from 0
Randomize 'initiate random number
RandomValueList = Int(ListCount * Rnd)' convert
listcount as random number in the RandomValueList variable
Browser("Name").Page("Name").WebList("Name").Select
("#" & RandomValueList) 'Call the RandomValueList variable
appending to index of weblist
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What are the properties you would use for identifying a browser and page when using descriptive programming?
What are the different types of functions available in qtp and explain ?
I am having major problems with some DB Table Checkpoints I add to my script. I 35 web based applications recorded and each has DB Table Checkpoints insert but only 1 script isn't recognizing the DB Table Checkpoints for some reason. I've checked the DB connections and the info in the Library Functions and still only this one script out of 35 doesn't recognize the DB Table Checkpoints. Can someone please help me figure out why only this one script out of 35 that's hitting the same database is having a problem.
How u will do versioning in QTP?
if our qtp vb Script may be Currepted then What we want do?
I recorded a Web App with a Oracle backend using QTP 9.5 and for some reason the scripts don't play back> What am I missing at this point. I recorded the same Apps under Sybase and they work great. This is Oracle 10g. Why won't my scripts play back.
How does quicktest professional (qtp) identifies the object in the application?
hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)
What is synchronization point in QTP?
Hi iam shankar here, right now iam working on manual testing. i want to switch over automation tool qtp, right now iam taking training class outside on qtp, please let me know the cost of QTP tool for full version, wether it's an annual subscription or monthly subscription.
How can you identify the browser and its information using the qtp script?
What is fragmentation and paging?
I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error
What is the difference between QTP and WinRunner? Why do you choose only QTP for automation among remaing tools like Rational robot and silk test? Write the VBscript for any functionality in your project ? What is the cost of QTP ? If you entered into yahoo mail with your valid user name then you will get FOR EXAMPLE , " welcome to krishna " on the top of inbo page , how can you test it in QTP? What type of testing you can do, when we gave you 5 screens and how can you test that application? What type of framework you are using in your company and explain it?
Explain how you can replace string in qtp?