Get Value from Combo

How to write descriptive programming for getting value from Combo for QTP 10.0?

Questions by QTPbeginner

Showing Answers 1 - 9 of 9 Answers

For every combo box there is a method "Getcontent" which you can use to get the values of the drop box. For e.g

msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetContent

In this example of classic Flight Reservation demo application I have clicked on "Fly From" to add this object to our repository and then I have used "GetContent" method to get all the values in the combo box.

  Was this answer useful?  Yes

rajaembees

  • Nov 19th, 2009
 

We can also use 'getselection" method for combobox.

a = browser("a").page("b').webList("c").getselection /* getselection will be used to get the selected value of the combo box */

msgbox a

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions