Google Chrome Console: XPath Expressions: $x(’//h1’)
Load the http://example.com web page. In Chrome DevTools Console, enter $x('//h1')
to select all h1
elements in the document. In this case, there is one.
Entering $x('/html/body/div/h1')
selects the same h1
element.