Show Menu
Cheatography

xPath Cheat Sheet (DRAFT) by

xPath selectors

This is a draft cheat sheet. It is a work in progress and is not finished yet.

General

/html
Whole web page
/html/body
Whole web page body
//text()
All text nodes of web page
/html/­bod­y/.../.../E
Element <E> by absolute reference
//E
Element <E> by relative reference

Tag

//img
Image element
(//E)[2]
Second <E> element