ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
   
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
how can you select random value for every iteration from a
weblist
 Question Submitted By :: Raj
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how can you select random value for every iteration from a weblist
Answer
# 1
get thetotal items in the list
and use the ' Randamize ' function Rnd()
 
Is This Answer Correct ?    1 Yes 4 No
Kiran1783
 
  Re: how can you select random value for every iteration from a weblist
Answer
# 2
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 ?    6 Yes 6 No
Amarendra Kothuru
 
 
 
  Re: how can you select random value for every iteration from a weblist
Answer
# 3
Get the count of elements in the weblist


for i = 0 to count-1

result = randomnumber(i,count-1)


browser("xyz").page("xyz").weblist(" ") .select result

next
 
Is This Answer Correct ?    0 Yes 4 No
Kishore
 
  Re: how can you select random value for every iteration from a weblist
Answer
# 4
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 ?    3 Yes 1 No
Vijay
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
1. IS A VIRTUAL OBJECT USED WHEN THE LABEL IS NOT RECOGNIZED BY QTP Ordain-Solutions7
IN EXCEL SHEET OF qtp SUPPOSE I ENTERED 10 NUMBERS RANDOMLY I HAVE TO GET TOTAL OF TEN NUMBERS IN THE 11 COLUMN USING qtp GIVE CODE TO IT USING qtp  2
what is meant by iterative model?What is its working principle?What are its advantages and what are its drawbacks?  1
in QTP,how to write a descriptive program for "yahoo" or "gmail" Login page  1
Per-Action Vs Shared repository?  5
I am Using QTP 9.1 version. I have created a Shared Object Repository. The size of Shared Object REpository is 9 MB. In my system i am able to execute the script very flexibly and it is very fast. But if i copy the same code into other system with the same configuration, it is executing very slowly(i.e dam slow). It is not happening in all machines it is in only some machines. Can please any one give th esolution. It is high priority to me as i need to give demo to client on their machines. TCS4
hi how could i get installation guide for QTP 9.0 on XP help me for this !!!!!  1
describe some problem that u had with automation testing tool?  3
How do u write script in qtp? where do u write?  2
Hi i want to export the data from applicatioon to excel and later i want to import and use it for my scripts hoe can i do this?  1
Waht is diff between SystemUtil.Run and invokeapplication  5
Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why? Crea1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com