Forum Discussion

AdiSoap123's avatar
AdiSoap123
Occasional Contributor
13 years ago

Error when using xpath with embedded xml

I am having an issue using xpath with my assertions when the xml reponse contains a string with an embedded xml. The relevent tag contains the text "<![CDATA[" followed by the imbedded xml string.

If I reference the relevent tag using xpath in my assertion and click 'Test' I get an error (see attached).

I want the assertion to pass if the relevent tag contains the imbedded xml (or any text for that matter), and fail if it's blank, but using the * wildcard for the expected result the assertion passes whether the string is present or not. Is there a way I can make the expected result <> "" or something like that, or can the assertion just not handle this imbedded xml?
  • AdiSoap123's avatar
    AdiSoap123
    Occasional Contributor
    OK, when testing the assertion when the xml reponse does not contain any text for the relevent tag I get the attached error. So why then does it pass when I use the * wildcard for the expected result?