Dynamic Link Identification
Question ID: 104142
3
0

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?

Marked as spam
Posted by (Questions: 1, Answers: 2)
Asked on June 30, 2010 8:57 pm
53 views
Answers (3)
6
Private answer

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.

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on June 30, 2010 9:03 pm
0
Private answer

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.

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on June 30, 2010 10:04 pm
0
Private answer

Each time you run the script, do you know where the link is going to be located? If so, you can use the index property to find and click it. If not, then Andy's answer is probably your best bet.

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on July 1, 2010 2:13 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top