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 ARE THE SHORTCUT KEYS IN QTP?

4 Answers   TCS,


how do you remove object repository at runtime and load object repository and verify it

2 Answers   Thomson Reuters,


What are the key points to create a framework in QTP for oracle forms?

0 Answers  


What is keyword driven framework, what is "key" in It.

2 Answers   IBM,


Hi All, I wanted know how does QTP identifies a DataCombo. While recording I clicked on the data combo and selected a value from the list. The click of Data Combo is recorded but the selection of the value from the list is not recorded. My application is based on VB and SQL server as the database. Please let me know as how do I record the action of selecting a value from a DataCombo list. The list is being loaded from the Database Record set.

0 Answers  






What is Object Spy?

8 Answers  


in a web table , i want you to click a particular object inside cell

2 Answers  


Hi,All How to create a link in excel sheet using qtp

0 Answers  


Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please

0 Answers   IBM,


Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.

0 Answers   IBM,


What is the use of breakpoint in qtp?

4 Answers   Zensar,


How does QTP identifies the object in the application?

1 Answers   Crea,


Categories