Learn XPath

29 lessons in six tracks, from your first predicate to shadow DOM, Appium and scraping. Every lesson has runnable examples, robustness ratings, and a one-click link into the playground.

New to XPath?

Start with the Introduction, work through Getting Started in order, then pick the tracks that match your stack. Already comfortable? Jump to Advanced Patterns or the Testing Tools track for your framework.

Getting Started

Syntax, paths, attributes, predicates, node types and operators. Everything else builds on these.

Core Tools

Axes, the complete XPath 1.0 function set, positions and boolean logic.

Text Handling

Matching what the user sees: whitespace, nesting, case and the text() versus . distinction.

Advanced Patterns

Tables, lists, forms, dynamic attributes, SVG, shadow DOM and the anchoring technique behind robust locators.

Debugging

Testing in DevTools, decoding error messages, and the truth about XPath performance.

Testing Tools

XPath in Selenium, Playwright, Cypress, Puppeteer, WebdriverIO, Appium and scraping libraries.