Playwright Locator Cheatsheet
Every Playwright locator strategy on one page
About this resource
I made this for myself first. After switching from Selenium to Playwright I kept forgetting whether I wanted getByRole or getByTestId, how filter() actually narrowed a locator, and which chaining pattern avoided flaky waits. So I condensed everything useful onto a single reference sheet.
It's not a tutorial or a beginner guide. It's a dense, organised reference - the kind you pin next to your monitor or keep as a second monitor split. Every entry is a real locator you'll reach for in production tests, nothing filler.
Free because good references should be free. If it saves you 20 minutes in your first week, it's done its job.
What's included
Single-page PDF reference
Everything on one page - designed for print (A3/A4) and screen at 150% zoom
Organised by topic
Locators → Chaining → Filtering → Assertions → Recipes - sections you can jump to in seconds
Instant download
No email required, no account needed - grab the PDF and open it immediately
Who this is for
Related