- Home
- QA & Testing
- XPath Tester
XPath Tester
Test XPath expressions against HTML or XML and see exactly which nodes match.
How it works
XPath is a query language for picking nodes out of HTML or XML. It is widely used in test automation tools such as Selenium and Playwright, and in scraping. Pick HTML or XML, paste your document, type an expression and press Evaluate.
Node results show the node type and its content. Expressions that return a value, such as count(//li) or string(//a/@href), show a number, string or true/false. Use XML mode for well-formed XML, which reports errors if the document is malformed.
Frequently asked questions
Why does my XPath work here but not in my test tool?
Your page may be built with JavaScript after loading, so the live DOM differs from the HTML you pasted. Copy the rendered HTML from your browser’s inspector.
Which XPath version is supported?
XPath 1.0, which is what browsers implement. Functions added in XPath 2.0 or 3.0 are not available.
Is my document uploaded?
No. Parsing and evaluation happen in your browser.