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 is the main use of reviews

2 Answers   Ordain Solutions,


How can get count of list box?

0 Answers  


How many types of parameters are there?

0 Answers  


How to define array in qtp?

0 Answers  


How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric

0 Answers  






What is the Difference between test object and run time object?

0 Answers  


Sometimes my QTP scripts works fine and sometimes its not though I am using same shared Repository and am not doing any changes in it.Even though for descriptive programming also its works fine and sometimes it does not work.my application is pretty stable.Could anyone please answer why am facing these types of issue??

1 Answers  


what is the code in QTP to take screen shot?

4 Answers   TCS,


scalability testing comes under in which tool?

4 Answers   EpuraTech,


Explain the benefits of quick test pro(qtp)?

0 Answers  


.how will you load the object during runtime

2 Answers   TCS,


It is very difficult to test in manual for that we go to DATA DRIVEN TEST.

3 Answers  


Categories