Hiya
I have a ranorex xpath for a window, whos title contains a single quote ' character
How can i escape that character in the xpath?
According to XPath 1.0 specification, attributes can be specified in double or single quotes
But it seems ranorex xpath only allows single quotes
e.g.
/form[@title='That's my window'] -> fails because of single quote in window title
/form[@title="That's my window"] -> doesnt work, but should according to xpath specification
Is there any function to take a string (window title), and escape all special xpath characters?
Cheers
[update]
/form[@title='That's my window'] -> also fails
XPath quotation characaters
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: XPath quotation characaters
Hi atom,
double quote should fix your problem!
You can easily checkout yourself if you use Ranorex Spy and tracking e.g. a textbox with a quote in it and looking to the related xpath.
Best regards,
Christian
Support Team
double quote should fix your problem!

You can easily checkout yourself if you use Ranorex Spy and tracking e.g. a textbox with a quote in it and looking to the related xpath.
Best regards,
Christian
Support Team