I am trying to understand what is wrong but I can't. I have used XPath so many times in my code, but this time I keep getting the error
Expected end of statement
without an obvious reason.
The error seems to be occurred because of the simple XPath:
xpathId = ".//h2[contains(.,'"&Identifier&"')]"
Identifier
is a variable that is set when the function is called:
Function Test(Identifier)
Identifier
when the error occurs? – Ansgar WiechersIdentifier
contains a single quote (for example) then it will mess up your closing quote and generate this error. – Dave