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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should have experience in framework means?

1411


Hi, I am using 2 excel sheet.First excel sheet works fine with the script, if it opens the 2nd excel sheet,it works fine,but after finish all the rows it is giving the following error in the following line. InValid Procedure call or argument Line (178): "Browser("name:="&result,"application version:=internet explorer 7").Page ("title:=bgt.*", "index:=0").WebList ("name:=SearchType","html id:=Select1","location:=0").Select SearchType1". I have seen a web article says that,If we use any vbscript friendly name it may gives the above error-Invalid procedure call or argument not sure,Am I using any VBScript frienlyName? in the above line? [but the same line is perfecly working for first Excel ] It is little urgent. Any Help Thanks you

1440


How can you send user defined messages to test report?

578


how to do the batch testing in test director using manual testing procedure?

1774


ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS

1520






How can you exit from an action?

608


explain how to write vb script in qtp?when will you write own script?

1853


How may types of defects identify application or your currently working application?pls give me answer..

1508


when I was doing the web testing with QTP using with standard checkpoint the Object selection -checkpoint properties dialog box not displaying pages and links hierarchical order. Could you please tell me. thanks

1723


What are the challenges you faced during you entire life automation ?

998


How QA specialist can identify when programmatic descriptions are useful?

1965


how to evalute defects in QTP script?

1480


What is synchronization? What are the ways you can synchronize?

644


How to delete an object from the object repository?

589


Hi am New to Automation Testing , any one can you help me what are the basic questiion are asked an interview?

1419