SQA QTP tutorial – WebList identified as a web element and how to select an item from this list

Hi. Today, I wanted to touch base on unorthodox objects that may appear as other objects. In my application, the web list appear as web elements and I wanted to show you a solution for selecting an item in this type of web list. In this situation, just treat it as a regular web element and you can directly click on this element to select it.

Browser("index:=0").Page("title:=.*").WebElement("outertext:=UniquePropertyName, "Index:=0").Click

The above code is just an example of how you can select an item out of this type of object.

1. Click on the web list so that the list opens up, use the object spy to identify the item in the list you are trying to select.

2. Then replace the identification properties in the example code above.

3. I am using index in this example because with one unique identifier, you may have trouble selecting the object. If this is the case, try switching from index 0 and 1 and you shouldn't have any problems.

That's it! As easy as that! Post your comments and questions below!

Pin It on Pinterest

Clef two-factor authentication