QTP10 - How to ID a generic object - 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: QTP10 - How to ID a generic object (/Thread-QTP10-How-to-ID-a-generic-object) |
QTP10 - How to ID a generic object - SRA - 08-26-2010 Hi, I've got a list of objects on a page and they are all defined as "chkSourceDbCd". How do I differentiate between these objects in QTP. I would like to run though the list one by one. Thanks for the assistance. Bill RE: QTP10 - How to ID a generic object - supputuri - 08-26-2010 HI SRA, what the enviroment of your app and could you pls share the Object Spy and the application screenshot, so that we can give some solution. RE: QTP10 - How to ID a generic object - SRA - 08-26-2010 Hi - please find the contents of the Object Spy in the attachment. Sorry but this is a gov't system and I can't provide a screen shot. I did try using the "value" property as each item in the list has a different one but to no avail. I believe an Index could be a better bet but this value is not apparent. I think the HTML may read the value of the index and not the value from the Object Spy. Probably from 1 to 20. Thanks RE: QTP10 - How to ID a generic object - SRA - 08-26-2010 Hi SUpputuri, I found that if I select each check box, QTP assigns a number to each one, starting a 0 or no number, up to 19. I just referenced the number QTP assigned to the checkbox. Then I can set the value as a parameter to ON or OFF Code: Browser("IFS :: Avalanche").Page("IFS :: Avalanche").WebCheckBox("chkSourceDbCd").Set "ON" RE: QTP10 - How to ID a generic object - supputuri - 08-27-2010 Hi SRA, You can use the childobject property and get the number of child objects which will meet your description in the page and then you perform the operations in the desired child item. Let me know if you need any more informaiton. RE: QTP10 - How to ID a generic object - SRA - 08-27-2010 Do you have some sample code to go along with your recommendation? Thanks, Bill |