XPath quotation characaters
Posted: Wed Mar 10, 2010 11:56 am
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
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