Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / chandu

x=Browser("Browser Name").page("PageName").Weblist
("WebListName").GetRoProperty("items count")
Browser("BrowserName").page("PageName").Weblist
("WebListName").Getitem(x)
in this code..Weblist("WebListName")...this is the
combobox name...in web based application..qtp will display
"WEBLIST"...not "COMBOBOX"...

Is This Answer Correct ?    10 Yes 3 No

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

Answer / chandu

x=Browser("Browser Name").page("PageName").Weblist
("WebListName").GetRoProperty("items count")
Browser("BrowserName").page("PageName").Weblist
("WebListName").Getitem(x)

the above code will select the last item in the list box

Is This Answer Correct ?    7 Yes 5 No

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

Answer / snig

http://funandknowledge.blogspot.com/2008/04/qtp-script-for-
combo-box-control.html

Is This Answer Correct ?    2 Yes 0 No

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

Answer / chandu

Hi
that is a fine idea Ajreddy...u can put a msgbox so that u
can able to know which one it is selected and ...in the code
"x" contains the total number..so obviously if u write
getitem(x)it will select the last item

Is This Answer Correct ?    2 Yes 1 No

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

Answer / 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

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

Answer / prashanth chenna

Hi Chandu,(Any One)
I have a strong need of Descriptive Programing. If u have
material, will you send me please.
Thank u in Advance.


Regards,
Prashanth Chenna,
shanthc@gmail.com, shanthc@yahoo.com

Is This Answer Correct ?    0 Yes 0 No

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

Answer / chandu

iam really sorry...i don't have any material of descriptive
programming...
regards
chandu

Is This Answer Correct ?    0 Yes 0 No

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

Answer / ajreddy

hi
what ever chandu wrote its correct
Example:
x=Browser("micclass:=Browser).page("micclass:=Page).Getroproperty("items
count")
msgbox x ' Here u knows how many items r there in combobox

' after that which item u want u can get it
y=Browser("micclass:=Browser).page("micclass:=Page).Getitem(lastitemindexnumber)
count")
msgbox y

Is This Answer Correct ?    2 Yes 3 No

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

Answer / prashanth chenna

Hi,
Thank Q Chandu and Ajreddy. I cleared my doubt.
Thanks a lot.
Bye.........

Is This Answer Correct ?    1 Yes 2 No

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

Answer / prashanth chenna

Hai Chandu,
In the above code, in 1st line how can u find item count by
using GetRoProprety("item count"),then where is the
combobox name, from which it can count?

Is This Answer Correct ?    3 Yes 5 No

Post New Answer

More QTP Interview Questions

What is diff betwee datatable.importsheet "path" and datatable.import

2 Answers  


What is Tree view?

2 Answers  


what is defenetion of kiran can u tell me plz CVS, SVN

0 Answers  


types of output value in details.

4 Answers  


how can we group that these test cases only should be automated and in which order you execute that test cases?

2 Answers   BSL,


Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji

0 Answers  


If requirments changed then how we can teach the QTP this is the new requirment

2 Answers   Accenture,


i have to pass the testcases into userid anf password of gmail login page using functions you can take your own testcaseslike userdid should take only lowerletters it should not take special charactors and uppercase letters and password should take only numericvalues it should not take alphanumeric and alphabets

2 Answers  


Explain about merging of two repositories?

3 Answers  


How can you close the second opened browser?

0 Answers  


w is configaration management

3 Answers   TCS,


how to calculate no. of repeating characters in a a string..please give me the code

14 Answers   CTS, Hexaware,


Categories