I had tough time dealing with XPath and single quote. Though W3C recommends using ' to escape it but I never got it working, let me know if any of you get through.
Came across this blog and found that “concat” could be used in this situation.
So original XPath expression is –
This is some thing which certainly fails as single quote in “Tester’s” marks it at end of string and then XPath blows up, next trial was –
This does not work despite w3c recommendation!
And then I used concat function and split the string as –
NOTICE that single quote is kept in double quote while other characters are kept in single quotes.
So XPath looks as –
And this works charm.