A webPage has a ComboBox with 10 values in it.
Write a script to select 4 vales from it using CTRL key

Answers were Sorted based on User's Feedback



A webPage has a ComboBox with 10 values in it. Write a script to select 4 vales from it using CTRL ..

Answer / sesibhushan

set listObj=Browser("micclass:=Browser").Page
("micclass:=Page").WebList("micclass:=WebList","name:=XXXX"

listObj.select "#1"
listObj.ExtendSelect "#2"
listObj.ExtendSelect "#3"
listObj.ExtendSelect "#4"

Note: This will work for combobox also.

Is This Answer Correct ?    11 Yes 1 No

A webPage has a ComboBox with 10 values in it. Write a script to select 4 vales from it using CTRL ..

Answer / shiva

Sub ExtendSelect_Example()
'The following example uses the ExtendSelect method to sele
'Socks from a list of clothing after Jeans has already been
selected.

Browser("index").Page("Fill-Out Form_2").WebList("what-to-
wear").Select "Jeans"
Browser("index").Page("Fill-Out Form_2").WebList("what-to-
wear").ExtendSelect "Socks"

Is This Answer Correct ?    0 Yes 1 No

A webPage has a ComboBox with 10 values in it. Write a script to select 4 vales from it using CTRL ..

Answer / sesibhushan

set listObj=Browser("micclass:=Browser").Page
("micclass:=Page").WebList("micclass:=WebList","name:=XXXX"

listObj.select "#1"
listObj.select "#2"
listObj.select "#3"
listObj.select "#4"

Note: This will work for combobox also.

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More QTP Interview Questions

what will be there in keyword view and expert view?

2 Answers  


Explain the QTP Tool interface.

2 Answers   Crea,


Hi, Any one have the crack for QTP 10.0,if so could you please send it to phanijuly10@gmail.com

2 Answers  


What is the significance of “action 0” in qtp?

0 Answers  


How do you move objects from local object repository to shared object repository???What are methods?

1 Answers  






How to handle the exceptions using recovery scenario manager In QTP?

2 Answers  


I had created the new virtual objects for web application buttons. how to add those virtual objects into object repository. Previously i had used Gui map in winrunner for capturing virtual objects for web application. Please help me regarding this. need your answer quickly

1 Answers  


How is UFT 11.5 version different from UFT 12.0?

0 Answers  


How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?

2 Answers  


w is fragmentation and paging

1 Answers   MBT,


how to associate object repository during runtime in qtp

1 Answers   Deloitte,


we have one text box and one list box(list box appear in same page or another page) what ever the text enter in text box that must be displyed in list box as first one. for example if we enter 10 in text box that is the 1st item in list box . after that we enter 11 then 11 is the 1st item and 10 is 2nd item. the maximum limit of list box is 10 items. if we enter 11th item the 10th item is deleted and llth one is add as 1st one and 9th one goes to 10th position

3 Answers   Covansys,


Categories