how can you select random value for every iteration from a
weblist
Answers were Sorted based on User's Feedback
Answer / 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 |
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 |
Answer / kiran1783
get thetotal items in the list
and use the ' Randamize ' function Rnd()
Is This Answer Correct ? | 1 Yes | 4 No |
hi gavasker i want how to merg OR's in QTP 8.2 by QTP Plus
How you automate testscripts one by one or moduelwise or all at once
How to open a new test using quicktest professional (qtp)?
Sometimes my QTP scripts works fine and sometimes its not though I am using same shared Repository and am not doing any changes in it.Even though for descriptive programming also its works fine and sometimes it does not work.my application is pretty stable.Could anyone please answer why am facing these types of issue??
what is smart identification?
Hi, I want to write the script for a webpage. But i didn't added the properties of the objects to the object repository. Without adding the object properties to the object repository, how to write the script. When i am writing the script, Let us say i typed as Browser (""). after selecting ".", if the object is added to the object repository it will display atomatically. But in my case it is not as i didn't added the object properties. How to proceed further in the above mentioned case to write the script manually. Pls let me know if you didn't understand the question.
how to compare two excell sheets by using vbscript??
If an application name is changing frequently i.e while recording it has name “Window1” and then while running its “Windows2” in this case how does QTP handle?
How to Close all browsers in reverse order.
How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it?
WHO TAKE DECISION TO RELEASE THE BUILD
What is the Difference between copy to action and call to action?