How to Display last item of a Combobox by using QTP?

Answer Posted / bhargavi

For web application it is not Combobox as mentioned above.
In windows application we will have combo box and here is the code for retrieving last item in combo box:

This example is explained using Flight application(Sample application given in QTP)

reqItem= Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount
msgbox Window("Flight Reservation").WinComboBox("Fly From:").GetItem(reqItem-1)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

when will you do debug your script? and explain that process?

1448


can any one say that where we can download the QTP trail version ??????????

1358


Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?

1552


Limitations in QTP?

1735


How do you check ticket cost and ticket number in flight application?

582






How to handle Java tree in QTP?

740


www.icici.com after this home page wll came, in this page what r the items we r going to test for manual and what the element we r test for QTP... explian clearly with example

1496


in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?

1350


Explain object spy in qtp.

580


This is Karthic and my mail id is karthic.venkitapathi@gmail.com, please give me an idea to crack qtp 10

1500


What is the default add-ins in qtp?

550


what is stepin & stepout?

1416


WAT IS DATA BASE AND XML CHECK POINT ?HOW TO IMPLEMENT IT ... GIVE PROPER EXAMPLE FOR IT

1699


How to build scripts that access data from external sources?

1598


What is the difference between qtp and selenium?

545