Playwright 1.65 landed on npm on November 5, 2026, and it is one of the more consequential releases of the year for anyone running end-to-end tests in CI. The headline is that the test runner can now run under Bun. The part that will actually show up in your pipeline, though, is a list of ten breaking changes, a few of which can turn a green suite red without a single line of your application changing.
This guide walks through what is new, which breaking changes are most likely to hit a typical Next.js, Angular or React project, and a sensible order for upgrading.
What’s new in Playwright 1.65
Running the test runner under Bun
Until now, @playwright/test ran on Node.js even if the rest of your project used Bun. In 1.65 you can run it under Bun directly. The --bun flag is required, otherwise bunx still hands the work to Node:
bunx --bun playwright test
The release notes are upfront about the limits. Under Bun:
- watch mode is not available;
- JSX settings from
tsconfigand the--tsconfigoption are ignored; - stack traces lack async frames and class names;
- console output does not appear in traces or in UI mode.
That makes Bun support a reasonable choice for a Bun-first project that mostly runs tests headlessly in CI. If your team leans on UI mode or traces to debug failures, the missing console output alone is a good reason to keep running Playwright on Node for now.
Reports that show only what went wrong
Two additions target the same problem: large suites produce large reports, and most of that content is passing tests nobody reads.
The new failures reporter prints failures and successful retries as they happen, then a summary at the end. Separately, the HTML, JSON and JUnit reporters accept an onlyFailures option that keeps only tests with unexpected outcomes (including unexpected passes), flaky tests and interrupted tests:
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
reporter: [
['failures'],
['html', { onlyFailures: true }],
],
});
Each reporter is configured independently, and there are matching environment variables if you only want this in CI: PLAYWRIGHT_HTML_ONLY_FAILURES, PLAYWRIGHT_JSON_ONLY_FAILURES and PLAYWRIGHT_JUNIT_ONLY_FAILURES. Two details are worth knowing. Flaky tests are included even when they eventually pass, and every attempt of an included test is kept. And because passing tests are dropped, the totals in these filtered reports shrink too, so don’t feed them into a dashboard that calculates pass rates.
An exclusive lock for tests that must run alone
Playwright 1.64 introduced named locks: tests that share a lock name never run at the same time, even across files and projects. Version 1.65 adds a built-in lock called -exclusive-, which runs a test only when no other test is running at all:
import { test } from '@playwright/test';
test('restart the server', { lock: '-exclusive-' }, async ({ request }) => {
// nothing else runs while this test is in progress
});
This is useful for the handful of tests that touch global state, such as restarting a dev server, clearing a shared database or changing feature flags for the whole environment. It is a scalpel, not a fix for a flaky suite: every exclusive test pauses parallelism, so use a regular named lock when you only need to keep two specific tests apart.
Smaller quality-of-life changes
test.skip(),test.fixme(),test.fail()andtest.slow()can now take just a description, for exampletest.skip('Not implemented yet');. The text appears in the report.PLAYWRIGHT_TRANSFORM_CACHE_DIRmoves the transpiled-test cache to a directory of your choice, which helps when you want to cache it between CI runs.cdpSession.send()acceptstimeoutand an abortsignal.- Custom reporters can call
testRun.mode()inreporter.preprocess().
The bundled browsers move to Chromium 158.0.8127.18, Firefox 159.0 and WebKit 27.2, and the release is also tested against Google Chrome 157 and Microsoft Edge 156.
Node.js 20 is no longer tested
Playwright 1.65 stops testing on Node.js 20. The supported versions are Node.js 22, 24 and 26, and the official Docker images now ship Node.js 26. If your CI image or actions/setup-node step still pins Node 20, change that first. Node 20 has already reached end of life, so this is overdue for most projects anyway.
The breaking changes, ranked by how likely they are to bite
The release notes list ten breaking changes. Here they are roughly in the order a typical web app team is likely to run into them.
1. Class fields now follow useDefineForClassFields
Playwright now compiles TypeScript class fields the same way tsc does, respecting useDefineForClassFields in your tsconfig.json. TypeScript turns that option on by default for modern targets (ES2022 and later), and many projects set such a target.
This matters for page objects, which very often look like this:
import type { Page } from '@playwright/test';
export class LoginPage {
readonly submit = this.page.getByRole('button', { name: 'Submit' });
constructor(private readonly page: Page) {}
}
With standard class field semantics, the field initializer runs before the parameter property page is assigned, so this.page is undefined and the test fails with “Cannot read properties of undefined”. The clean fix is to assign the locator inside the constructor:
import type { Locator, Page } from '@playwright/test';
export class LoginPage {
readonly submit: Locator;
constructor(private readonly page: Page) {
this.submit = page.getByRole('button', { name: 'Submit' });
}
}
The alternative is setting "useDefineForClassFields": false in the tsconfig.json your tests use. That works, but it ties your test code to a legacy compilation mode. My recommendation is to fix the page objects; it is usually a mechanical change, and a quick search for = this.page. finds most of them.
2. Actions wait for elements to stop being inert
Actions such as click, check, tap, fill, clear and selectOption now wait while the target element, or one of its ancestors, has the inert attribute, and time out if it stays inert. That is closer to what a real user can do, since inert content can’t be interacted with.
Where this shows up: modal dialogs and drawers. Many component libraries mark the rest of the page inert while a dialog is open. A test that previously clicked something behind an open dialog (often by accident) will now time out. The fix is to close the dialog first, which usually makes the test more realistic.
3. Sharded runs with no tests now fail
A sharded run now fails with “No tests found” when no tests match across all shards. This tends to happen in CI setups that combine --shard with --grep, --only-changed or a project filter that sometimes matches nothing. If an empty run is legitimate in your pipeline, say so explicitly:
npx playwright test --shard=2/4 --only-changed=origin/main --pass-with-no-tests
4. Proxy credentials are no longer sent to websites
If you configured a proxy with a username and password and relied on those credentials also answering the site’s own HTTP Basic auth prompt, that no longer works. Proxy credentials now answer only proxy challenges. Use httpCredentials for the site:
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
httpCredentials: {
username: process.env.STAGING_USER ?? '',
password: process.env.STAGING_PASSWORD ?? '',
},
},
});
This is a common setup for password-protected staging environments, so check it if your E2E suite runs against one.
5. Unrendered text drops out of accessible names and aria snapshots
Text that the browser does not render, such as content in a web component that isn’t assigned to a slot, is no longer included in accessible names or aria snapshots. Two things can change as a result: a getByRole('button', { name: ... }) lookup that matched on that hidden text may stop matching, and stored aria snapshot baselines may need updating. Review the diff before accepting new baselines, since a changed name can also point to a genuine accessibility problem in the component.
6. APIRequestContext params are appended, not replaced
When you pass params to an API request as a string or a URLSearchParams object, it is now appended to any query string already in the URL rather than replacing it:
const res = await request.get('/api/products?sort=price', {
params: new URLSearchParams({ page: '2' }),
});
// 1.65 requests /api/products?sort=price&page=2
If your API tests built URLs with a placeholder query string and expected params to overwrite it, update them.
7. Cookie matching follows RFC 6265
cookies() on browser contexts and API request contexts now follows RFC 6265 when deciding which cookies match a URL. Tests that read cookies for a URL whose domain or path does not strictly match the cookie may get fewer results than before. Auth helpers that copy session cookies between contexts are the place to look.
8 to 10. Tooling-level changes
- Stylesheet imports:
.css,.lessand.scssimports in test files now load as empty modules instead of being removed, which means the imported file must exist. This mostly affects component tests that import styles. - Blob reporter: it again deletes the contents of its output directory before writing. If you merge reports from several jobs, make sure each job writes to its own directory or downloads artifacts after the run.
- CommonJS test locations: locations of calls such as
test(now point to the start of the callee, which changes column numbers. Only tools that match on exact columns should notice.
A practical upgrade order
- Check Node. Make sure local machines and CI run Node.js 22, 24 or 26.
- Upgrade the package and browsers on a branch:
npm install -D @playwright/test@1.65.0 npx playwright install --with-deps - Run the full suite once without sharding so failures are easy to read. Class field errors and inert timeouts usually appear first.
- Fix page objects that read constructor parameter properties in field initializers.
- Review aria snapshot diffs carefully instead of bulk-updating them.
- Audit CI configuration: add
--pass-with-no-testswhere empty shards are valid, move site auth tohttpCredentials, and check blob report directories if you merge reports. - Optionally adopt the new reporters, for example the
failuresreporter in the terminal andonlyFailuresfor HTML reports uploaded as CI artifacts.
Should you upgrade now?
For most teams, yes, but on a branch and with a full run first. None of the breaking changes are hard to fix, and several (inert elements, unrendered text, RFC-compliant cookies) bring Playwright’s behaviour closer to what a real browser and a real user would do, which is the point of end-to-end tests. The Bun support is promising but still has meaningful gaps for debugging, so treat it as optional rather than a reason to switch runtimes.
If you pin Playwright in a Docker image or a shared CI template, remember that the official images now include Node.js 26, so update that image tag deliberately rather than letting it drift.
Sources: Playwright release notes, Playwright docs: Reporters, Playwright docs: Test API (locks), Playwright docs: Command line, @playwright/test on npm, TestDino: Playwright 1.65 release overview