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 |
can u Give Procedure to Handle Pop Window & write Code for that
Write a script to delete a specific row in a webtable.
Which functionalities of QTP used in banking project? pls any say answer?
Hi,EXCEL SHEET AND DATA TABLE . BOTH ARE SAME OR NOT?
Why do we use text checkpoint as we can make use of the same in the standard check point?
How to test whether the navigation i.e. from one page to another is working r not using QTP for web based application
How u send bugs to dev'lpment team all at once or one by one or waht is the process?
How to invoke Mozilla from QTP thru VB Script
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?
What is the difference Between LowLevel and Normal Recording Modes?
What is an object repository?
what is the difference between function and subroutine ....here every one knows theoretically...here my QUESTION IS WHAT IS THE MEANING OF FUNCTION CAN RETURN A VALUE AND SUB CAN NOT RETURN A VALUE .....WHAT DOE'S IT MEAN FUNCTION CAN RETURN A VALUE HOW FUNCTION CAN AND SUB CAN'T ....GIVE A EXAMPLE FOR BOTH ....HOW IT CAN AND CAN NOT...HELP ANDY ONE....