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 exit and entry criteria of automation testing. any body wants a real time script,please mail to me. contactno;9986435766
Hi,All How to create a link in excel sheet using qtp
can we call a test in another test? how? explain with one example?
Hi, Can anyone write the following qtp script...please its urgent ·Navigate to Google in a new IE instance ·Search for the following word "Gap, Inc." ·Iterate thought the first 10 pages of google ·On each page collect the following ·The "blue" page title ·The "green" url ·Output all the data into a file named "test_output.txt" ·Format "Title – URL"
How to write test cases for web applications using QTP.plz write a sample test case to show how to write.urgently needed.thanks in advance..
How to use library files in QTP? how we can call these files in to script?
how do u plan test automation?
What are the QTP advantages and disadvantages?
how do check the links in a webpage ?
what is the difference between xmlutil and xmlDOM in qtp?
How do u do batch testing in WR & is it possible to do in QTP, if so explain?
Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly