You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f07e0f7
Browse filesBrowse the repository at this point in the historyBrowse files
cherry-pick(#41940): docs: release notes for v1.62 (#41967)
Release notes for the upcoming **v1.62** release.
### Highlights
- **New component testing model** — stories & galleries with the new `mount` fixture
- **AbortSignal** support on operations and web-first assertions (`signal` option)
- **WebP screenshots** — store `toHaveScreenshot()` snapshots as `.webp`
- **`Reporter.preprocess()`** hook for custom test filtering
- **Isolated retries** via `retryStrategy: 'isolated'`
### Also includes
- New APIs: WebAuthn passkeys in storage state (`storageState.credentials`), `APIResponse.timing()`, `Locator.waitForFunction()`, functions as `evaluate`/`addInitScript` args, `scroll` action option
- CLI/MCP: Playwright now bundles the MCP server and `playwright-cli` (`npx playwright mcp` / `npx playwright cli`)
- HTML reporter `mergeFiles` config option
- Announcement: Debian 11 is no longer supported
- Browser versions: Chromium 151.0.7922.34, Firefox 153.0, WebKit 26.5
Validated locally with `npm run doc`.
Pass a story type as a template argument to type-check its props, and use `update(props)` /
27
+
`unmount()` on the returned locator to re-render or tear down within a test.
28
+
29
+
### 🛑 Cancel operations with AbortSignal
30
+
31
+
Most operations and web-first assertions now accept a `signal` option that takes an
32
+
[`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal), letting you
33
+
cancel long-running actions, navigations, waits, and assertions:
[`method: Page.screenshot`] and [`method: Locator.screenshot`] also accept `webp` as a `type`,
59
+
where quality `100` (the default) is lossless and lower values use lossy compression.
60
+
61
+
### 🧩 Custom test filtering with Reporter.preprocess()
62
+
63
+
New [`method: Reporter.preprocess`] hook runs after the configuration is resolved and before
64
+
[`method: Reporter.onBegin`], letting a reporter mark individual tests as skipped, excluded,
65
+
fixed, or failing through a [TestRun] object:
66
+
67
+
```js
68
+
classMyReporter {
69
+
asyncpreprocess({ config, suite, testRun }) {
70
+
for (consttestofsuite.allTests()) {
71
+
if (shouldSkip(test))
72
+
testRun.skip(test);
73
+
}
74
+
}
75
+
}
76
+
```
77
+
78
+
### 🔁 Isolated retries
79
+
80
+
New [`property: TestConfig.retryStrategy`] controls when failed tests are retried. The default
81
+
`'immediate'` retries as soon as a worker is free; `'isolated'` runs all retries at the end,
82
+
one by one in a single worker, to minimize interference with the rest of the suite:
83
+
84
+
```js title="playwright.config.ts"
85
+
exportdefaultdefineConfig({
86
+
retries:2,
87
+
retryStrategy:'isolated',
88
+
});
89
+
```
90
+
91
+
### New APIs
92
+
93
+
#### Browser and Context
94
+
95
+
- New option [`option: BrowserContext.storageState.credentials`] includes the context's virtual WebAuthn [Credentials] (passkeys) in the storage state, so they can be persisted and re-seeded into later contexts.
96
+
97
+
#### Actions
98
+
99
+
- New `scroll` option (`"auto"` | `"none"`) on actions to opt out of Playwright's automatic scroll-into-view.
100
+
101
+
#### Network
102
+
103
+
- New [`method: APIResponse.timing`] returns resource timing information for an API response.
104
+
105
+
#### Evaluation
106
+
107
+
- New [`method: Locator.waitForFunction`] waits until a function — called with the matching element — returns a truthy value.
108
+
-[`method: Page.evaluate`] and related methods now accept functions as evaluate arguments.
109
+
-[`method: Page.addInitScript`] / [`method: BrowserContext.addInitScript`] now accept functions as init-script arguments.
110
+
111
+
#### Command line & MCP
112
+
113
+
- Playwright now bundles the [Playwright MCP](./getting-started-mcp.md) server and [`playwright-cli`](./getting-started-cli.md), runnable via `npx playwright mcp` and `npx playwright cli`.
114
+
115
+
#### Reporters
116
+
117
+
- The HTML report's **Merge files** grouping — previously only a UI toggle — can now be enabled from the config with the new `mergeFiles` reporter option:
118
+
119
+
```js title="playwright.config.ts"
120
+
exportdefaultdefineConfig({
121
+
reporter: [['html', { mergeFiles:true }]],
122
+
});
123
+
```
124
+
125
+
### Announcements
126
+
127
+
* ⚠️ Debian 11 is not supported anymore.
128
+
129
+
### Browser Versions
130
+
131
+
- Chromium 151.0.7922.34
132
+
- Mozilla Firefox 153.0
133
+
- WebKit 26.5
134
+
135
+
This version was also tested against the following stable channels:
0 commit comments