Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not able to find the Link Object.
#1
Solved: 10 Years, 9 Months, 1 Week ago
I have recorded a click action for a link whos name(Alphaneumaric) changes randomly. So every time i run the test, it gives the error as below.

"Cannot identify the object "bdacb9079e" (of class Link). Verify that this object's properties match an object currently displayed in your application."

So How to record this varying link on which i have to record click action?

Please help am a beginner for QTP.
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
Next time please paste the code you have been trying. That way it is easier to correct and reply back. The reason you are facing the error is because,

There is a link which you have stored with certain properties. these properties are static. However, during runtime the link could change due to various actions and hence the properties would change too. This brings us to deal with dynamic properties.

A concept called Regular expression is a powerful term used to deal with such scenarios. What you do is find a particular property which remains constant across all the links if text is appended or removed. Basically if you have links with properties like,

1. name:= LearnQTP
2. name:= LearnQTPagain
3. name:= LearnQTPandQTP

So if i want to identify all the links with a single line of code then i will use regular expression. Here is how i would do it,

Learn.* - It means ignore everything after *. Remember the word "Learn" is a constant in all the three properties. This way QTP will know that you have told it to look for a link with the name Learn and hence your script will go through.

As a beginner, i understand it is very tough to get to know everything. Pressure at work coupled with the urgency to get the task done pushes every individual to take the most shortest route. However, i suggest, the shortest route to get the answer is always to first search for similar posts, read through and maybe or probably you will find the answer before somebody answers it.

Good Luck with the learning mate !!!
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
First of all thanks a lot for your reply Basanth. Support from people like you make life easy for beginners like me.

Actually when i recorded, i had a link named "bdacb9079e". and when i ran my test, the link changed to "cdodd349ef". so what would be the regular expression to pass if i have all 10 characters variable and where. Right now i am passing Reg Exp for text of the object.

Thanks again.
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
aye aye sir Smile

Well, if thats the case, and you want to identify the link using the codes( cdodd349ef ) then here are a few questions,
1. Is these codes static or dynamic ? Meaning, all through your regression does this data remain same ?
2. Is this code a critical property for identification ? I mean, without specifying it does it recgonise the link ? If it does then you can use a property called "getroproperty" and then retrieve this code. However, i dont think thats your purpose.
3. Nothing at the top of my head now Smile answer the above and we will proceed further..

Cheers mate !! I like people who are intrested to "take wisdom,apply it and then give it back downstream".
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#5
Solved: 10 Years, 9 Months, 1 Week ago
ok.. Smile

Yes.. the link(cdodd349ef) is dynamic and its a critical property for identification.
Reply
#6
Solved: 10 Years, 9 Months, 1 Week ago
Check the index property for the webelement and see if that helps. Then with the list of available codes you have, click if the code matches else log the error.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot find the "[ WebButton ]" object's parent "[ Page ]" (class Page) sumitparolkar@gmail.com 4 4,773 05-03-2013, 11:53 PM
Last Post: agarwl.anurag
  "Object not visible" when running desktop link RandomGrin 2 4,233 12-12-2012, 08:49 PM
Last Post: RandomGrin
  Run Error: Cannot find Object's parent anupam4j 3 6,470 09-18-2012, 10:26 AM
Last Post: sshukla12
  Link/Anchor tag name attribute in object naming? dingerjunkie 1 2,344 05-03-2012, 06:08 PM
Last Post: dingerjunkie
  Cannot find the "Edit" object's parent "Notepad" gnanajyothi 1 3,036 04-09-2012, 11:12 AM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 1 Guest(s)