Forum Discussion
Cizo89
13 years agoFrequent Contributor
Hi,
if you want to use the XPath Present(Exists) function, I'd say that XPath Match assertion would be better than simple Contains Assertion.
Use the script for creating XPath Assertion with these modifications:
You just have to put your XPath into function exists(), that should work fine for your requirements
Regards,
Marek
if you want to use the XPath Present(Exists) function, I'd say that XPath Match assertion would be better than simple Contains Assertion.
Use the script for creating XPath Assertion with these modifications:
xpathAssertion.setPath("exists(your_xpath)")
xpathAssertion.setExpectedContent("true")
You just have to put your XPath into function exists(), that should work fine for your requirements
Regards,
Marek