has_x_path Method
Determines whether a specific element exists in the document.
Syntax
def has_x_path(xpath: str) -> bool: ...
Remarks
The x_path property implements a subset of the XML XPath specification, allowing you to point to specific elements in the XML response.
The path is a series of one or more element accessors separated by '/'. The path can be absolute (starting with '/') or relative to the current x_path location.
Setting the x_path property to an xpath that does not exist will cause an error. You can use the on_has_x_path method to determine if a particular xpath exists before setting it with x_path.