Playwright v1.54 has officially landed, and it brings powerful new features, cleanups, and critical updates that improve test clarity, cross-site behavior handling, and long-term compatibility.
Let’s break down what’s new in this release:
Cookie Partitioning for CHIPS Compatibility
Playwright now supports cookie partitioning via the partitionKey parameter in browserContext.cookies() and context.addCookies(). This is a step toward supporting CHIPS (Cookies Having Independent Partitioned State) — a browser feature that isolates cookies on a per-top-level-site basis, enhancing privacy and security in cross-site contexts.
const cookies = await context.cookies({ partitionKey: 'https://example.com' });
This update aligns with evolving browser standards like Privacy Sandbox and mitigates third-party cookie misuse.
Cleaner HTML Reports with noSnippets
You can now simplify your HTML test reports by skipping embedded code snippets. Just set noSnippets: true in the reporter config:
reporter: [['html', { noSnippets: true }]]
This is especially useful for large test suites where readability matters most.
Annotations Now Show Source Locations
Playwright now adds a location property to test annotations like test.skip() and test.fixme(). This helps you quickly trace where and why tests were skipped or flagged, saving time during debugging.
test.skip('flaky on CI');
You’ll now see exactly where that skip was declared — a subtle but powerful addition.
Reuse Sessions via --user-data-dir
A new CLI flag --user-data-dir lets you persist browsing context (logins, session state) across sessions when using tools like codegen.
npx playwright codegen --user-data-dir=./user-data
Perfect for recording tests with pre-authenticated states or preserving local storage between sessions.
Cleanup and Deprecations
Playwright v1.54 introduces important runtime and CLI refinements:
- Node.js 16 support has been dropped
- Node.js 18 is now officially deprecated
- The -gv flag has been retired → use --grep-invert instead
- npx playwright open no longer starts the recorder — switch to npx playwright codegen for interactive test generation
These adjustments streamline the developer experience and promote forward compatibility.
Verified Browser Compatibility
This release has been rigorously validated against the latest browser versions:
- Chromium 139
- Firefox 140
- WebKit 26
- Chrome 140 & Edge 140 (Stable)
Stay up-to-date to take advantage of browser engine improvements and compatibility fixes.
Final Thoughts
Playwright v1.54 isn’t a flashy release—but it’s a smart one. With enhanced test annotations, CHIPS-aligned cookie handling, and cleaner reporting, it's setting the groundwork for privacy-centric and maintainable testing at scale.
Connect with a leading web application testing company to stay ahead with the latest updates.
Top comments (0)