05-14-2010, 08:02 AM
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 !!!
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.
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.