03-29-2012, 03:21 AM
I'm testing an instance of Salesforce.com and have run into an issue. Our development team is using a numerical indicator inside a hyperlink to let the user know how many of "something" reside on the page that link takes a user to. My example is a link that takes the user to a page that has a list of names on it. The link itself reads: Call List [10]...this means that they have ten records on the call list page. Obviously as we test, that number could change to any value.
My problem is a simple one. Because the link itself has square brackets, I believe QTP won't let me use the regular expression feature on the link object. I've tried every way I know to change the text, innertext, outtertext and name of the object in the OR using the regular expression feature. A few that I've tried:
Call List*
Call List [*]
Call List \[\*\]
Call List [(*)]
...and many other variations.
I've even tried using some other expressions such as \w. No matter what I try, I can't get it to work. Does anyone out there have a suggestion? Usually when I get into a problem like this, it is something simple, but I've been trying to figure it out for hours.
The error I'm receiving: "Cannot identify the object 'LeftNav - Call List...'"
My line of code throwing the error:
Browser("salesforce.com - Unlimited").Page("salesforce.com - Unlimited").Frame("Frame").Link("Left Nav - Call List*").Click
I've attached a screen shot of my OR for anyone who is interested. It couldn't be more simple.
Thank you!
My problem is a simple one. Because the link itself has square brackets, I believe QTP won't let me use the regular expression feature on the link object. I've tried every way I know to change the text, innertext, outtertext and name of the object in the OR using the regular expression feature. A few that I've tried:
Call List*
Call List [*]
Call List \[\*\]
Call List [(*)]
...and many other variations.
I've even tried using some other expressions such as \w. No matter what I try, I can't get it to work. Does anyone out there have a suggestion? Usually when I get into a problem like this, it is something simple, but I've been trying to figure it out for hours.
The error I'm receiving: "Cannot identify the object 'LeftNav - Call List...'"
My line of code throwing the error:
Browser("salesforce.com - Unlimited").Page("salesforce.com - Unlimited").Frame("Frame").Link("Left Nav - Call List*").Click
I've attached a screen shot of my OR for anyone who is interested. It couldn't be more simple.
Thank you!