Write the code for select the 5 values from drop down list.
drop down list having the 10 values.

Answer Posted / balaji

For eg:If the weblist contains some x no. of values and if
we want to select only 10 out of it then


i=browser(..).Page(..).weblist(...).Getitemscount()

For j=0 to i
if j<5 then
browser(..).Page(..).weblist(...).select j

end if
next

This code will retrieve only the first 5 values

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi ,Can any one pleas explain how to test splash objects using QTP?

1909


What contains Data Driven Framework document in qtp?

1471


What is test object model in quicktest professional (qtp)?

551


How many types of parameters are there?

547


1.How to record ,capture and also script to capture the close buttons. 2.How to record ,capture and also script to capture the options ---File ->save and File ->close in a browser and PDF files. 3.How to compare the Excel sheet values in a report using QTP scripting. 4.How to compare 2 PDf reports using QTP scripts as well reording. 5.How to compare 2 Excel reports using QTP scripts as well reording. 6.How to save a PDF report to a folder and then translate the report to an Excel type of report and compare that Excel Report with an other excel report. Please clarify me

1602






Hello friends..... On which areas of an application we can not test with QTP

1559


How do you configure QTP AND Test director?

1502


What is file database?

1696


what is key word driven frame work ? why it is called like that ? what is the diference between keyword driven and data driven frame work ?

1557


How is UFT 11.5 version different from UFT 12.0?

613


What is smart identification in QTP?

634


How to get Traceability matrix from TD?

680


What is the quicktest professional testing process?

533


What is business process testing(bpt) in qtp?

695


What is qtpro?

597