Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP - not recognize links that contain "(" or ")"
#1
Solved: 11 Years, 4 Months, 2 Weeks ago
Hi,

I have a problem with the links that contain "(" or ")".
I use next vbscript code:

Code:
link = "link (test)"
Set obj_DescAssert = Description.Create
obj_DescAssert("name").value= link
NameToUse = "name:="+link
Browser(BrowserName).Page(TitlePageName).Link(NameToUse).Exist

In this case the QTP do not recognize the link.
If I use:
link = "link test"
everything work OK.

Do you have any idea how to resolve this issue?

Thannks
Reply
#2
Solved: 11 Years, 4 Months, 2 Weeks ago
I found the solution!

To access a link "link (test)" you must type "link \(test\)"
Reply
#3
Solved: 11 Years, 4 Months, 2 Weeks ago
The reason is "(" & ")" are used for creating regular expressions. To treat them as literal characters, we need to append an escape character before them. This escape charatcer is \
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Does QTP recognize C++ Objects? Babita01 0 3,543 05-15-2012, 03:09 PM
Last Post: Babita01
  QTP doesnot recognize Java objects. Babita01 0 3,910 05-15-2012, 11:41 AM
Last Post: Babita01
  QTP "Can't recognize object" error Ansh123 3 3,472 12-28-2011, 02:59 PM
Last Post: sshukla12
  Does QTP Recognize IBM Work place forms 2.7??? nit_naresh 0 2,353 09-04-2011, 10:43 AM
Last Post: nit_naresh
  How to Recognize that Browser returns an Error page after hitting a URL with QTP ? Sukhvinder 7 6,514 07-09-2011, 11:11 AM
Last Post: rajpes

Forum Jump:


Users browsing this thread: 2 Guest(s)