DevTools Tips

Evaluate XPath to find elements in the page

Categories: Supported by:

DevTools supports 2 ways to evaluate XPath expressions to help you locate elements in the page. All browsers support those 2 ways:

Screenshot of the Inspector panel in Firefox showing the search field with an XPath expression

Note that you can also copy the XPath expression from any element in DevTools.


Screenshot of the Console panel in Safari showing an array of elements, as the result of executing the above function