XPath

A query language for picking parts of an XML or HTML document by their position in the tree.

In more detail

Paths such as //div[3]/button depend on the exact page structure. They break whenever the layout changes, so role-based locators are preferred in tests.

Related terms

Taught in

References