I always love a good cheat sheet hanging on my corkboard when I’m working, and XPath is one of the fields where I often refer to it. If you’re looking for a good XPath cheat sheet you will probably find something useful in this post.
1. XPath, CSS, DOM, Selenium Locators
This is a nice wallchart from Rosetta Stone and Cookbook that covers such popular technologies as XPath, CSS and DOM in the sense of locator syntax. There are two charts here. The first one is organized like an XPath Cookbook with plenty of recipes:
and the other one is more like an XPath Reference Book with all the locators organized by their categories:
2. XPath 1.0 Quick Reference
This quick reference from deepX contains information about XPath Axes and Functions. It takes two full sheets and offers short descriptions for every element with references to W3C recommendation paragraphs:
3. XPath 2.0 Quick Reference
4. XSLT 1.0 & XPath 1.0 Quick Reference
This XSLT and XPath Quick Reference from Mulberry Technologies is supposed to be printed on both sides of the page and be folded four times. It gives a short list of functions, operators, node and object types and other elements of XPath and XSLT. Unlike the deepX’s chart, it gives just short clues without any descriptions (but with a bigger font):
5. XPather Cheatsheet
The last cheat sheet, which is from Viktor Zigo, is not in PDF format, but I really like its simplicity. So, if you’re okay with an online cheat sheet, you can visit http://xpath.alephzarro.com/content/cheatsheet.html.