SQA(QA automation with QTP/UFT) – Select an item out of a combo box with a vbscript

Hi! I am going to show you how to use QTP/UFT to select an item from the combo box(Web List) below.

Code:


 

Browser("index:=0").Page("title:=.*").WebList("outertext:=test1test2test3").Select "test2"


If you use object spy and click on the dropdown(Combo box) above, you will see that it's classified as a web list. When an object is a web list, use the select method to grab a specific value from that list. Easy right?

Post your questions and commends below! I love all of your feedback!

 

Pin It on Pinterest

Clef two-factor authentication