I'm having problems clicking a dynmaic link in QTP 10. The location of the link I'm clicking on changes every time the script is run. Also, there are many links on the page with the same name. Any suggestions on how to uniquely identify the link I am focusing on?
Answer by Andy · Jun 30, 2010 at 09:03 PM
Are there any consistencies between any of the object properties? Can the object be identified by any property other than the text or the logical name? If so you can create a generic link object in QTP with a parameterized property to match the identifier of the object or use a regular expression if there are any patterns in the object's descriptive properties.
Answer by bubblehead712 · Jun 30, 2010 at 10:04 PM
Some of the attributes you can use in the Object Repository or descriptively are 'outertext', 'outerhtml', 'innertxt', 'innerhtml', 'html id', url, and 'href'. some of these attribute should help you in identifying the object with regular Expression. Another option is to use QTP "Web Ext SDK" to defind an unique the links. The Web Ext. kit is provided in patch QTPWeb0047.