XPath Assertion
Download
Source Code:Â https://github.com/testify/XPathAssertion.git
Latest Snapshot:Â Coming Soon
Latest Release:Â Coming Soon
Description
The XPath Assertion is a Testify assertion service that checks that the result of an XPath expression against a processor response is true. To use this assertion, the user must provide the assertion name, "XPathAssertion" (not case sensitive), followed by "::" and the assertion information.
Assertion Information
The assertion information is the XPath Expression. The example text below shows the format for this assertion. This example text would be successful if the total number of times where the element name: "id" appears under the namespace: "NAMESPACE" is equal to 1 within the processor response. The assertion text below must be placed within the assertion block.
XPathAssertion::count(//*[local-name()='id' and namespace-uri()='NAMESPACE'])=1