1.XPath
XPath is the XML path language, which is a language used to determine the location of a certain part of an XML (subset of the standard common standard language) document.
XPath is an XML-based tree structure that provides the ability to find nodes in the data structure tree
Action object: assert for the data type whose return object is XPath
2. Interface display
How to add:
A request--right click to add--assertion--XPath2 Assertion
![](https://img-blog.csdnimg.cn/img_convert/9e5ad3e63fd8ccb3f064db618d018c1a.png)
3. Obtaining method
![](https://img-blog.csdnimg.cn/img_convert/ff3592a253c0c834a2df887389ddd950.png)
Put it in XPath Assertion: there is an error
![](https://img-blog.csdnimg.cn/img_convert/48a31ba55b67b8ebd4f98acdd04124db.png)
4. XPath Assertion must be used together with the assertion result to check whether the XPath Assertion is correct
5. Results page:
![](https://img-blog.csdnimg.cn/img_convert/2cadff34473acd8425b8e92cc9a69bec.png)
The assertion result page will also report an error:
![](https://img-blog.csdnimg.cn/img_convert/9399d1e12d1f475cc17f722a8dcd37d9.png)