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.
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!
Latest posts by Admin (see all)
- SQA QTP tutorial – WebList identified as a web element and how to select an item from this list - December 9, 2015
- Automation QTP tutorial-double clicking on any object - December 4, 2015
- Software Automation QTP tutorial – 5 top reasons for using automation - November 23, 2015