pw·handbook
Levels Domain Projects Capstones Search GitHub
level 02 / playwright-fundamentals

Playwright Fundamentals

Locators, actions, assertions, and wait strategies practiced on real demo applications.

Your First Playwright Test

Install Playwright, understand playwright.config.ts, and write a test that runs in Chromium, Firefox, and WebKit simultaneously.

30 min practice: SauceDemo

Locators

getByRole, getByText, CSS, XPath, test IDs — and which to choose for tests that survive refactors.

40 min practice: SauceDemo

Actions

Click, fill, select, hover, drag, keyboard — Playwright's auto-waiting action APIs and when each one is the right tool.

35 min practice: DemoQA Forms

Assertions

expect() in depth — visible/hidden, text, URL, count, attribute, and soft assertions that don't abort the test on first failure.

30 min practice: SauceDemo

Waiting Strategies

Auto-wait, explicit waits, network waits — and why sleep() is always wrong. Master the retry-until-actionable model that eliminates 90% of flakiness.

25 min
pw·handbook — production-grade Playwright engineering, level by level.
Home · Playwright Docs · MIT License