I have multiple hypertextlinks on my page each with a different "text". When I run my script QTP fails to identify this object with the following error
Cannot identify the object "Earn 0.084" (of class Link)
Line (2): "Browser("QTP_Test6").Page("QTP_Test6").Link(" Earn 0.084").Click".
I referenced the user manual, page 67 where it asks to set the href property for hypertext links. It did not do a smart identification with this information. Any suggestions?
If I were you I'd just leave the identification and use the text identifier.... no hassles since each link has a diff text. You could use the following line and save urself the trouble of identifying what property shud be there n which one shudnt.
I used the object spy to read the text value. It's reading the full text on the html page as the object value, instead of just reading the "link" text value, "Earn 0.084". Have you had such a problem before.
Thanks Mark for the clarification, but it does not recognize my link object, no matter which property I use. (When I object spy, it reads the complete HTML page as the text value)
I tried your suggestion, but in vain:
I might have mislead you here. I apologize. The "text:=" should include the visible text. The actual text that you see as the link. Not the target url. So say for instance I have a link that reads 'Logout' that would be the text to be included in the statement I gave previously. It's href value maybe something else.
(I'm hiring Software Development Engineers in Test in Seattle, WA)