def has_xpath(self, query, **kwargs):
return self.has_selector("<STR_LIT>", query, **kwargs)<EOL>
Checks if a given XPath expression is on the page or a descendant of the current node. ::

    session.has_xpath(".//p[@id='foo']")

``has_xpath`` can also accept XPath expressions generated by the ``xpath-py`` package::

    from xpath import dsl as x

    session.has_xpath(x.descendant("p"))

Args:
    query (str): An XPath expression.
    **kwargs: Arbitrary keyword arguments for :class:`SelectorQuery`.

Return:
    bool: If the expression exists.