Playwright 1.60–1.62 Feature Tutorials
11 standalone tutorials covering every new Playwright feature from May–July 2026. Each post includes runnable code, before/after comparisons, gotchas, interview questions, a quiz, and a mini project.
Playwright 1.60
locator.drop() API
Stop synthesizing DataTransfer objects by hand. Playwright 1.60 ships a cross-browser drop() API that handles file uploads, clipboard data, and rich text drops in one call.
Lesson 2HAR Recording on Tracing
Stop juggling separate HAR files and trace files. Playwright 1.60 folds HAR recording into the tracing API so you debug network and UI failures in a single window.
Lesson 3ARIA Snapshots with Boxes
Playwright 1.60 adds a boxes option to ariaSnapshot() so AI agents get layout coordinates alongside the accessibility tree. The missing piece for self-healing test agents.
Lesson 4test.abort() Guardrails
Playwright 1.60 gives you a way to fail a test immediately from a fixture, hook, or route handler when a guardrail is violated. No more silent damage to shared resources.
Playwright 1.61
WebAuthn Passkeys
Playwright 1.61’s browserContext.credentials API lets you seed passkeys into a virtual authenticator. Test WebAuthn login flows in CI without buying a YubiKey for every runner.
Lesson 2WebStorage API
Stop stringifying functions for page.evaluate. Playwright 1.61 exposes page.localStorage and page.sessionStorage as real objects with getItem, setItem, items, and clear.
Lesson 3Video Modes & Soft Poll
Playwright 1.61 brings video retention modes that match how teams actually debug, plus expect.soft.poll for non-fatal polling assertions during exploratory runs.
Playwright 1.62
Stories & Galleries
Playwright 1.62 reinvents component testing. Stories wrap components in scenarios, galleries render them on demand, and fixtures.mount() returns a Locator scoped to the story.
Lesson 2AbortSignal Cancellation
Playwright 1.62 adds a signal option to every action and web-first assertion. Cancel long-running clicks, navigations, and waits from your test code.
Lesson 3WebP Screenshots
Playwright 1.62 supports lossless WebP for toHaveScreenshot() and lossy WebP for page.screenshot(). Cut artifact storage 10x without losing visual fidelity.
Lesson 4Isolated Retries
Playwright 1.62 adds retryStrategy: 'isolated' — run all retries at the end in a single worker to minimize interference with the rest of the suite. Perfect for flaky-test forensics.
Comments
Comments
Post a Comment