| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-05-11 | 7.6 kB | |
| v1.60.0 source code.tar.gz | 2026-05-11 | 40.0 MB | |
| v1.60.0 source code.zip | 2026-05-11 | 42.2 MB | |
| Totals: 3 Items | 82.2 MB | 37 | |
🌐 HAR recording on Tracing
tracing.startHar() (playwright.dev) / tracing.stopHar() (playwright.dev) expose HAR recording as a first-class tracing API, with the same content, mode and urlFilter options as recordHar. The returned Disposable makes it easy to scope a recording with await using:
:::js
await using har = await context.tracing.startHar('trace.har');
const page = await context.newPage();
await page.goto('https://playwright.dev');
// HAR is finalized when `har` goes out of scope.
🪝 Drop API
New locator.drop() (playwright.dev) simulates an external drag-and-drop of files or clipboard-like data onto an element. Playwright dispatches dragenter, dragover, and drop with a synthetic [DataTransfer] in the page context — works cross-browser and is great for testing upload zones:
:::js
await page.locator('#dropzone').drop({
files: { name: 'note.txt', mimeType: 'text/plain', buffer: Buffer.from('hello') },
});
await page.locator('#dropzone').drop({
data: {
'text/plain': 'hello world',
'text/uri-list': 'https://example.com',
},
});
🎯 Aria snapshots
- expect(page).toMatchAriaSnapshot() now works on a Page, in addition to a Locator — equivalent to asserting against
page.locator('body'). - New
boxesoption on locator.ariaSnapshot() (playwright.dev) / page.ariaSnapshot() (playwright.dev) appends each element's bounding box as[box=x,y,width,height], useful for AI consumption.
🛑 test.abort()
New test.abort() (playwright.dev) aborts the currently running test from a fixture, hook, or route handler with an optional message. Use it when you have detected an unrecoverable misuse and want to fail the test right away:
:::js
test('does not publish to the shared page', async ({ page }) => {
await page.route('**/publish', route => {
test.abort('Tests must not publish to the shared page. Use the `clone` option.');
return route.abort();
});
// ...
});
New APIs
Browser, Context and Page
- Event browser.on('context') (playwright.dev) — fired when a new context is created on the browser.
- BrowserContext now mirrors lifecycle events from its pages: browserContext.on('download') (playwright.dev), browserContext.on('frameattached') (playwright.dev), browserContext.on('framedetached') (playwright.dev), browserContext.on('framenavigated') (playwright.dev), browserContext.on('pageclose') (playwright.dev), browserContext.on('pageload') (playwright.dev).
Locators and Assertions
- New option
descriptionin page.getByRole() (playwright.dev) / locator.getByRole() (playwright.dev) / frame.getByRole() (playwright.dev) / frameLocator.getByRole() (playwright.dev) for matching the accessible description. - New option
pseudoin expect(locator).toHaveCSS() reads computed styles from::beforeor::after. - New option
stylein locator.highlight() (playwright.dev) applies extra inline CSS to the highlight overlay, plus new page.hideHighlight() (playwright.dev) to clear all highlights.
Network
- webSocketRoute.protocols() (playwright.dev) returns the WebSocket subprotocols requested by the page.
- New option
noDefaultsin browserType.connectOverCDP() (playwright.dev) disables Playwright's default overrides on the default context (download behavior, focus emulation, media emulation), so attaching to a user's daily-driver browser doesn't disturb its state.
Errors and Reporting
- New webError.location() (playwright.dev) mirrors consoleMessage.location() (playwright.dev).
- consoleMessage.location() (playwright.dev) now exposes
line/columnproperties (lineNumber/columnNumberare deprecated). - New testInfoError.errorContext (playwright.dev) surfaces additional diagnostic context, such as the aria snapshot of the receiver at the time of an
expect(...)matcher failure. - reporter.onError() (playwright.dev) now receives a
workerInfoargument with details about the worker for fixture teardown errors.
Test runner
- New
{testFileBaseName}token in testProject.snapshotPathTemplate (playwright.dev) — file name without extension. - Test runner now errors when a config tries to override a non-option fixture, and rejects
workers: 0or negative values.
🛠️ Other improvements
- HTML reporter:
npx playwright show-reportaccepts.zipfiles directly — no need to unzip first.- Steps that contain attachments inside nested children show an indicator on the parent step.
- The
repeatEachIndexis shown in the test header when non-zero. - Trace Viewer adds a pretty-print toggle for JSON / form request and response bodies in the network details panel.
Breaking Changes ⚠️
- Removed long-deprecated APIs:
Locator.ariaRef()— use the standard locator.ariaSnapshot() (playwright.dev) pipeline.handleoption onBrowserContext.exposeBindingandPage.exposeBinding.loggeroption onBrowserType.connectandBrowserType.connectOverCDP— use tracing instead.- Context options
videosPath/videoSize— userecordVideoinstead.
Browser Versions
- Chromium 148.0.7778.96
- Mozilla Firefox 150.0.2
- WebKit 26.4
This version was also tested against the following stable channels:
- Google Chrome 147
- Microsoft Edge 147