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                      
Google
   
 
Categories >> Software >> Testing >> Automation Testing >> QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions (496)
 Load Runner interview questions  Load Runner Interview Questions (486)
 QTP interview questions  QTP Interview Questions (3506)
 Test Director interview questions  Test Director Interview Questions (161)
 Rational TestSuite interview questions  Rational TestSuite Interview Questions (106)
 Silk Test interview questions  Silk Test Interview Questions (59)
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions (387)
Question
how can you select random value for every iteration from a
weblist
 Question Submitted By :: QTP
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
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 ?    4 Yes 1 No
Vijay
 
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 7 No
Amarendra Kothuru
 
 
 
Answer
# 3
get thetotal items in the list
and use the ' Randamize ' function Rnd()
 
Is This Answer Correct ?    1 Yes 4 No
Kiran1783
 
Answer
# 4
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 5 No
Kishore
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
which command u will use to access the application through descriptive programing? Datamatics 7
Suppose there is a link present somewhere in an excel sheet. Find the link and click on it. How to write a script using Excel application object in QTP?   1
In one of the scripts the pwd in the DT was encripted. Can any one tell me how to I decript or undo the same? BirlaSoft 3
What is QTP Frame Work ,and i want it in detail Value-Labs 2
How to use custom checkpoints in QuickTest Professional? TCS 1
can we test an windows application using qtp   1
Can we create test script with out Step Generator?   4
Did you use flatfiles in your projects?At what situation you used it?How can you upload flatfiles?   1
1.In VB Script 100 lines Script. How can check the Syntax errors? 2. Write a VB Script for X = India/Srilanka/Australia/England/South Africa.I need the Output Country wise? [ 1st Msgbox India , 2nd Msgbox Srilanka] ---- 3. How can Choose these test cases to be automated? HP 5
Where can i get the QTP tutorials. I wanna move to automation testing. Is there any book or URL, where i can find the source to read...   1
For what purpose to we use object repository in a application?also explain usage of obj.repository?   3
How to create an Action Template?   1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com