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 the XML file architecture ?
There is a very good institute for Automation Testing using QTP.For more details please visit jbslearnings.com.
How to capture a window in QTP?
How to Install QTP on Citrix Environment? Possible send me the installation steps.. That would be great help
I am using environment variable xml to give credenatials for login into unix. Is there any way we cam mask the password in the xml?
What criteria do you use when determining when to automate a test or leave it manual?
I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)
If u r using descriptive programming to identify the object where do u write the script for those objects? do u write it in the expertview? plz do answer its urgent thanks advance.
anyone can explain about "Hybrid framework" in QTP
interviwer asks what is data table? my ans is Data table is an internal Excel file of QTP...intervier not happy with this also? can u post any other answer?
How to remove the associated function library?
This is the script generated by qtp plz can anyone write the same script using descriptive programming plzzzz guys do answer. Browser("orkut - login").Page("orkut - login").WebEdit ("Email").Set "rgovard" Browser("orkut - login").Page("orkut - login").WebEdit ("Passwd").SetSecure "47525d8be4926ea2f6e96b9a3f7472b6ae38" Browser("orkut - login").Page("orkut - login").WebButton ("Sign in").Click Browser("orkut - login").Page("orkut - home").Link ("Logout").Click Browser("orkut - login").Page("orkut - login").Sync Browser("orkut - login").Close