v1.54.0
microsoft/playwrightv1.54.0Jul 10, 2025by dgozman
AI Summary
Introduces support for partitioned cookies (CHIPS), a new location annotation property, a noSnippets option for the HTML reporter, and a --user-data-dir option. Removes Node.js 16 support and deprecates Node.js 18.
Key Highlights
- New partitionKey property for cookies (CHIPS support)
- New location property in test annotations
- New noSnippets option for HTML reporter
- New --user-data-dir option to reuse browsing state
- Removed Node.js 16 support
Breaking Changes
- Removed support for Node.js 16
- Deprecated support for Node.js 18
New Features
- Cookie partitioning support
- Annotation location tracking
- HTML reporter snippet control
- User data directory reuse
- Node.js version updates
Full Release Notes
## Highlights
- New cookie property `partitionKey` in [browserContext.cookies()](https://playwright.dev/docs/api/class-browsercontext#browser-context-cookies) and [browserContext.addCookies()](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-cookies). This property allows to save and restore partitioned cookies. See [CHIPS MDN article](https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies) for more information. Note that browsers have different support and defaults for cookie partitioning.
- New option `noSnippets` to disable code snippets in the html report.
```js
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [['html', { noSnippets: true }]]
});
```
- New property `location` in test annotations, for example in [testResult.annotations](https://playwright.dev/docs/api/class-testresult#test-result-annotations) and [testInfo.annotations](https://playwright.dev/docs/api/class-testinfo#test-info-annotations). It shows where the annotation like `test.skip` or `test.fixme` was added.
## Command Line
- New option `--user-data-dir` in multiple commands. You can specify the same user data dir to reuse browsing state, like authentication, between sessions.
```bash
npx playwright codegen --user-data-dir=./user-data
```
- Option `-gv` has been removed from the `npx playwright test` command. Use `--grep-invert` instead.
- `npx playwright open` does not open the test recorder anymore. Use `npx playwright codegen` instead.
## Miscellaneous
- Support for Node.js 16 has been removed.
- Support for Node.js 18 has been deprecated, and will be removed in the future.
## Browser Versions
- Chromium 139.0.7258.5
- Mozilla Firefox 140.0.2
- WebKit 26.0
This version was also tested against the following stable channels:
- Google Chrome 140
- Microsoft Edge 140