This release includes 4 breaking changes for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
+9 more
ReleasePort's take
Moderate signalPlaywright v1.60.0 removes multiple long‑deprecated APIs including Locator.ariaRef(), the handle option on exposeBinding, and logger options on connect APIs.
Why it matters: If your code uses any of these deprecated APIs, update it now to avoid runtime failures after upgrading to v1.60.0.
Summary
AI summaryRemoved several long‑deprecated APIs such as Locator.ariaRef(), handle option on exposeBinding, logger options on connect/connectOverCDP, and context videoPath/videoSize.
Changes in this release
| Type | Severity | Summary | CVE |
|---|---|---|---|
| Breaking | Medium |
Removed deprecated Locator.ariaRef() API Removed deprecated Locator.ariaRef() API Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Breaking | Medium |
Removed handle option from exposeBinding Removed handle option from exposeBinding Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Breaking | Medium |
Removed logger option from connect APIs Removed logger option from connect APIs Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Breaking | Medium |
Removed videosPath and videoSize context options Removed videosPath and videoSize context options Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
HAR recording available via first-class tracing API HAR recording available via first-class tracing API Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
New locator.drop() simulates drag-and-drop operations New locator.drop() simulates drag-and-drop operations Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
New test.abort() aborts currently running test New test.abort() aborts currently running test Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
Aria snapshots work on Page objects Aria snapshots work on Page objects Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
Aria snapshots include element bounding boxes Aria snapshots include element bounding boxes Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
New browser.on('context') event fires on creation New browser.on('context') event fires on creation Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
getByRole supports description option getByRole supports description option Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
New page.hideHighlight() clears highlights New page.hideHighlight() clears highlights Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
webSocketRoute.protocols() returns subprotocols webSocketRoute.protocols() returns subprotocols Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
New webError.location() provides location info New webError.location() provides location info Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
consoleMessage.location() exposes line/column properties consoleMessage.location() exposes line/column properties Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
snapshotPathTemplate supports {testFileBaseName} token snapshotPathTemplate supports {testFileBaseName} token Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
Test runner errors on non-option fixture override Test runner errors on non-option fixture override Source: llm_adapter@2026-05-21 Confidence: high |
— |
| Feature | Medium |
BrowserContext mirrors page lifecycle events BrowserContext mirrors page lifecycle events Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
toHaveCSS supports pseudo option toHaveCSS supports pseudo option Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
locator.highlight() supports style option locator.highlight() supports style option Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
connectOverCDP supports noDefaults option connectOverCDP supports noDefaults option Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
testInfoError.errorContext provides diagnostic context testInfoError.errorContext provides diagnostic context Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
reporter.onError() receives workerInfo argument reporter.onError() receives workerInfo argument Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
Test runner rejects invalid workers value Test runner rejects invalid workers value Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
Trace Viewer pretty-prints JSON form data Trace Viewer pretty-prints JSON form data Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
HTML reporter accepts .zip files directly HTML reporter accepts .zip files directly Source: llm_adapter@2026-05-21 Confidence: low |
— |
| Feature | Medium |
BrowserContext mirrors page lifecycle events (download, frameAttached/Detached/Navigated, pageClose/Load) BrowserContext mirrors page lifecycle events (download, frameAttached/Detached/Navigated, pageClose/Load) Source: granite4.1:30b@2026-05-23-audit Confidence: low |
— |
| Feature | Medium |
toHaveCSS assertion supports a 'pseudo' option to read styles from ::before or ::after toHaveCSS assertion supports a 'pseudo' option to read styles from ::before or ::after Source: granite4.1:30b@2026-05-23-audit Confidence: low |
— |
| Feature | Medium |
locator.highlight() now accepts a 'style' option for custom inline CSS on the highlight overlay locator.highlight() now accepts a 'style' option for custom inline CSS on the highlight overlay Source: granite4.1:30b@2026-05-23-audit Confidence: low |
— |
| Feature | Medium |
browserType.connectOverCDP now supports a 'noDefaults' option to disable Playwright's default context overrides browserType.connectOverCDP now supports a 'noDefaults' option to disable Playwright's default context overrides Source: granite4.1:30b@2026-05-23-audit Confidence: low |
— |
| Feature | Medium |
testInfoError.errorContext surfaces additional diagnostic context such as aria snapshots on matcher failures testInfoError.errorContext surfaces additional diagnostic context such as aria snapshots on matcher failures Source: granite4.1:30b@2026-05-23-audit Confidence: low |
— |
| Feature | Medium |
reporter.onError now receives a 'workerInfo' argument with worker details for fixture teardown errors reporter.onError now receives a 'workerInfo' argument with worker details for fixture teardown errors Source: granite4.1:30b@2026-05-23-audit Confidence: low |
— |
| Feature | Medium |
Test runner rejects invalid workers values such as 0 or negative numbers Test runner rejects invalid workers values such as 0 or negative numbers Source: granite4.1:30b@2026-05-23-audit Confidence: low |
— |
| Feature | Low |
Trace Viewer adds a pretty‑print toggle for JSON/form request and response bodies in network details panel Trace Viewer adds a pretty‑print toggle for JSON/form request and response bodies in network details panel Source: granite4.1:30b@2026-05-23-audit Confidence: low |
— |
Full changelog
🌐 HAR recording on Tracing
tracing.startHar() / tracing.stopHar() 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:
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() 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:
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() / page.ariaSnapshot() appends each element's bounding box as[box=x,y,width,height], useful for AI consumption.
🛑 test.abort()
New test.abort() 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:
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') — fired when a new context is created on the browser.
- BrowserContext now mirrors lifecycle events from its pages: browserContext.on('download'), browserContext.on('frameattached'), browserContext.on('framedetached'), browserContext.on('framenavigated'), browserContext.on('pageclose'), browserContext.on('pageload').
Locators and Assertions
- New option
descriptionin page.getByRole() / locator.getByRole() / frame.getByRole() / frameLocator.getByRole() for matching the accessible description. - New option
pseudoin expect(locator).toHaveCSS() reads computed styles from::beforeor::after. - New option
stylein locator.highlight() applies extra inline CSS to the highlight overlay, plus new page.hideHighlight() to clear all highlights.
Network
- webSocketRoute.protocols() returns the WebSocket subprotocols requested by the page.
- New option
noDefaultsin browserType.connectOverCDP() 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() mirrors consoleMessage.location().
- consoleMessage.location() now exposes
line/columnproperties (lineNumber/columnNumberare deprecated). - New testInfoError.errorContext surfaces additional diagnostic context, such as the aria snapshot of the receiver at the time of an
expect(...)matcher failure. - reporter.onError() now receives a
workerInfoargument with details about the worker for fixture teardown errors.
Test runner
- New
{testFileBaseName}token in testProject.snapshotPathTemplate — 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() 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
Breaking Changes
- Removed Locator.ariaRef() – use locator.ariaSnapshot().
- Removed `handle` option from BrowserContext.exposeBinding and Page.exposeBinding.
- Removed `logger` option from BrowserType.connect and BrowserType.connectOverCDP – use tracing instead.
- Removed context options `videosPath` and `videoSize` – use `recordVideo`.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About playwright
All releases →Related context
Related tools
Beta — feedback welcome: [email protected]