How to identify dynamically changing objects? - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How to identify dynamically changing objects? (/Thread-How-to-identify-dynamically-changing-objects) |
How to identify dynamically changing objects? - Ravi_Chandra - 12-30-2010 Hi, I am working on an application where the objects are changing dynamically. Below is the example: 1. For a check box, OR is taking as Webelement also when we run for multiple times then the object could not be identified... its index is getting changed... Can anyone help on creating a logic where we can identify objects during run time? Also can anyone share piece of code related to this? Thanks, Ravi RE: How to identify dynamically changing objects? - basanth27 - 01-03-2011 Ravi, there are two things here, 1. Object identification 2. Identifying object based on index. We will have to deal with each one individually. Here is a hint, For the first case, Object Identification: Webcheckbox should be easily identified if the Web addin is selected. If not, try some basic trouble checks like, 1. Close all. Open QTP, Then Open the application. See if that helps. 2. Spy and try to find if there is any other layer which is preventing QTP from talking to the application. 3. Talk to dev team to see if they can help you out with the identification. Index Based : This is pretty easy, if you know what you want to do.For eg: if i know that the name of an webcheckbox is "All of the above" then i would loop through all the checkboxes to see if i get the text "all of the above" and then find the index of it and select it. Present your case and we should be able to flow forward. |