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 |
What is Associate Repository in QTP 9.2 ?
What is the concept of firewalls?
How we can call the scripit from another scripit in QTP?,Not a call Action
how to use the QTP choose the data from oracle? e.g. i input the identity card NO. this will be add new record in the database ,and now i want get this record's prime key.
Hi, i have a string like "INDIA". I need to display this string vertically in Msgbox?
What is the Diff between Image check-point and Bit map Check point?
Write a function which returns the addition of two numbers. give the value of the numbers outside the function.
hi friends can any one provide me the project in qtp because i have to attend to interview within one week atleast you provide the website address which provide the qtp projects
which type of testing process are you following in ur company? how to recognize a qtp page?
What is the difference between "call to action" and "call an existing action"
9 Answers Accenture, Yana Software,
What is the use of "New Property" in "Add properties" of testobject properties in object repository. How can i use "New properties" while writing scripts if i have assign some values to the testobject properties Can anyone help me? plz
What is text/text area checkpoint?