Playwright.
Modern end-to-end testing with Playwright — auto-waits, network interception, traces, and parallel execution.
Beginner
Start here — no prior experience needed
Your First Playwright Test
Install Playwright, write an end-to-end test against a real page, and read the runner's output — including what a failing assertion actually tells you.
Locators: Finding Elements That Stay Found
Role, label and text locators, why strict mode fails on purpose, and how filtering and chaining pin down one element in a list without using nth().
Auto-Waiting and Web-First Assertions
Why expect(locator) retries and expect(value) does not, what actionability checks block on, and how to fix a flaky test without adding a sleep.
Actions and Forms
Fill inputs, tick boxes, choose options, upload files and handle dialogs — plus what fill actually dispatches and when you need pressSequentially instead.
Hooks, Fixtures, and Test Isolation
Group tests with describe, share setup with beforeEach, then replace both with custom fixtures that build a page object and clean up after themselves.
Intermediate
For developers with core concepts down
Authentication and Reusing Session State
Log in once instead of once per test: storage state files, a setup project with dependencies, and per-worker accounts when tests mutate the logged-in user.
Network Interception and API Mocking
Intercept requests with page.route to mock JSON, force error states, delay responses, and patch a real API reply — then record a HAR to replay a whole backend.
Debugging: Traces, UI Mode, and Codegen
Turn a red CI run into an answer: record traces, open them in the viewer, step through with the inspector, and generate a first draft of a test with codegen.
Advanced
Production-grade patterns for experienced engineers
Parallelism, Sharding, and Configuration
Control how many workers run, when to force serial execution, how to shard a suite across CI machines, and what a retry is really telling you.
Visual Comparison and API Testing
Pixel and ARIA snapshots that do not fail on every deploy, plus using the request fixture to seed data over HTTP and test an API without a browser.