Creuto is now an OpenAI Select Partner Read More

Software Architecture & Technical

Playwright 1.65: ten breaking changes to check first

Playwright 1.65 drops Node.js 20 and changes class fields, sharding, cookies and aria names. Ten breaking changes, ordered by how likely they are to hit.

Playwright 1.65: ten breaking changes to check first

Playwright 1.65, released on 5 November 2026, breaks suites that passed on 1.64 in ten documented ways. The likeliest to bite is a TypeScript page object whose field initialiser now throws TypeError: Cannot read properties of undefined (reading 'getByRole'). Check that, your Node.js version and your sharded CI jobs first; the rest are narrower. We have not run this upgrade on a client suite, so what follows is a reading of the release notes plus one check we ran ourselves.

Playwright 1.65 at a glance: what changed and when

Three items sit outside the breaking-changes list and still decide whether you can upgrade at all. Playwright no longer tests on Node.js 20, its system requirements now read "latest 22.x, 24.x or 26.x", and its Docker images ship Node.js 26 instead of 24.

ItemWhat the release notes say for 1.65
Release date5 November 2026, per the GitHub release (1.64 shipped on 7 October)
Node.jsNo longer tested on Node.js 20; use 22, 24 or 26
Docker imagesNode.js 26 replaces Node.js 24
BrowsersChromium 158.0.8127.18, Firefox 159.0, WebKit 27.2
New in the runnerBun support behind --bun, a failures reporter, an onlyFailures option, a built-in -exclusive- test lock

The ten breaking changes, ordered by blast radius

The release notes list the changes without ranking them. The order below is our judgement of how many suites each will hit, not Playwright's.

#ChangeWhat breaksWhat to do
1Class fields follow useDefineForClassFieldsPage object fields that read a constructor parameter property throwInitialise in the constructor, or set the flag to false
2Empty sharded runs fail"No tests found" when no test matches across all shardsPass --pass-with-no-tests on jobs that can be empty
3Cookie matching follows RFC 6265Host-only and path-prefix cookies no longer returnedRe-check cookie assertions in API and auth tests
4Proxy credentials stop going to websitesSite logins that relied on proxy credentials failUse httpCredentials for website authentication
5Unrendered text leaves accessible namesgetByRole with a name and aria snapshots can changeReview snapshot diffs by hand
6Actions wait for non-inert elementsClicks on inert elements time outFix the page state or the selector
7Request params append to the URL queryCalls that relied on replacing the queryRemove the duplicate from the URL
8CSS, Less and Sass imports load as empty modulesImports of files that do not exist now failMake sure the imported file exists
9Blob reporter clears its output directoryOther files in that directory are deletedGive blob output its own directory
10CommonJS test locations point to the callee startColumn numbers shift, such as 3:7 for 3:11Update tools that parse locations

1. Page object fields: the this.page error

This is the change we expect to hit most TypeScript suites. Playwright's notes say class fields now follow useDefineForClassFields from your tsconfig, the same as tsc, and that the flag is on for ES2022 and later targets and when target is not specified. A field that reads a constructor parameter property now runs before that property exists:

class LoginPage {
  // TypeError: Cannot read properties of undefined (reading 'getByRole')
  readonly submit = this.page.getByRole('button', { name: 'Submit' });
  constructor(private readonly page: Page) {}
}

We reproduced the pattern in a scratch file with TypeScript 6.0.3. With --target ES2022 --strict, tsc --noEmit reports error TS2729: Property 'page' is used before its initialization. With --target ES2020 it reports nothing, and so it does with --useDefineForClassFields false. So a tsc pass on your real tsconfig finds the affected classes before you touch Playwright. Playwright's two fixes are to move the assignment into the constructor or to set "useDefineForClassFields": false; the TypeScript flag switches to the ECMAScript runtime behaviour, so the constructor fix ages better.

2. Sharded jobs that can end up empty

A sharded run now fails with "No tests found" when no tests match across all shards, while an empty shard still passes if other shards have tests. If a pull request job combines --shard with a filter such as --grep or --only-changed, it can match nothing in every shard and turn red on a harmless change. The CLI reference describes --pass-with-no-tests as making the run succeed even if no tests were found; apply it to those jobs only, so a broken test path still fails loudly.

3. API tests: cookies and proxy credentials

Cookie matching now follows RFC 6265. With a URL, browserContext.cookies() and apiRequestContext.cookies() no longer return host-only cookies for subdomains or Path=/api cookies for /apiv2. Separately, the credentials in the proxy option now answer only proxy challenges. A suite that logged into a staging site through its proxy settings needs httpCredentials instead.

4. Aria snapshots and getByRole names

Text the browser does not render, such as unslotted text or text directly inside a closed <details>, is no longer part of accessible names or aria snapshots. The notes say this can change page.getByRole() with a name, locator.ariaSnapshot() and expect(locator).toMatchAriaSnapshot(). Whether your baselines change depends on your markup, which we cannot know; run once and read every diff before you regenerate anything.

The remaining five are narrower: the inert-element wait, appended request params, empty CSS modules, the blob reporter's cleanup and shifted CommonJS locations. The notes also say test.skip(), test.fixme(), test.fail() and test.slow() now accept only a description, listed outside the breaking changes. Search your suite for calls that pass a condition before you assume they still work.

If you skipped 1.64, four more changes apply

Playwright 1.64 shipped on 7 October, so teams that jump from an older version meet its breaking changes too. Per the notes: the screen property is now forwarded from device descriptors (opt out with screen: undefined); JSX in test files follows your tsconfig; --update-snapshots=missing now passes the run, and the default mode is called 'default'; and elements inside hidden iframes count as hidden.

When not to upgrade to Playwright 1.65 yet

Hold the upgrade if your CI cannot leave Node.js 20. Node's own release schedule lists Node.js 20 end of life as 30 April 2026, so staying on 1.64 for that reason postpones a Node upgrade you already owe, and Node.js 22 reaches end of life on 30 April 2027. Node 20 is leaving other toolchains too: see HubSpot CLI Node 20 support ends 8 January 2027.

Skip Bun for now unless you need it. Playwright's notes say it runs under Bun only with --bun, with no watch mode, no effect from --tsconfig and JSX options, no custom ESM loaders, and test console output missing from traces and UI mode. That is a trade, not a free speed-up.

A staged rollout that keeps the suite green

  1. Run tsc --noEmit against your real tsconfig on the current version and fix page object classes first.
  2. Move the CI image and Docker base to Node.js 22, 24 or 26 in a separate change, so a failure has one cause.
  3. Bump @playwright/test on a branch and run the full suite once without updating snapshots; read every aria diff.
  4. Add --pass-with-no-tests only to filtered or sharded jobs that can legitimately be empty.
  5. Merge for nightly runs first, then pull request pipelines, and treat a green run as a floor, not proof: our note on mutation testing AI generated tests shows what passing assertions can hide.

Getting a Playwright suite through a version bump

If your team wants a second pair of eyes on the TypeScript sweep, the CI image change and the snapshot review before the next release train, our QA and automation team can scope it with you, and our CI/CD implementation work covers the pipeline side. Bring your tsconfig and the output of one failing run.

Frequently asked questions

Playwright 1.65 lists ten breaking changes: class fields now follow useDefineForClassFields, empty sharded runs fail, cookies follow RFC 6265, proxy credentials stop reaching websites, unrendered text leaves accessible names, actions wait for non-inert elements, request params append, CSS imports load empty, the blob reporter clears its folder, and CommonJS locations shift.

No. Playwright 1.65 no longer tests on Node.js 20, and its system requirements list the latest 22.x, 24.x or 26.x. A suite on Node.js 20 may still run, but Playwright does not test it there, so plan the Node upgrade before relying on the new version in CI.

Playwright 1.65 makes TypeScript class fields follow useDefineForClassFields, which is on for ES2022 targets and when no target is set. A field initialiser that reads a constructor parameter property now runs first and throws. Move the assignment into the constructor, or set useDefineForClassFields to false in your tsconfig.

Not necessarily. Playwright 1.65 drops text the browser does not render, such as unslotted text or text inside a closed details element, from accessible names and aria snapshots. Run the suite once without updating snapshots and review each diff; regenerate baselines only where the change is expected.

Yes, with limits. Playwright 1.65 runs the test runner under Bun when you pass the bun flag, as in bunx --bun playwright test. There is no watch mode, tsconfig and JSX options have no effect, custom ESM loaders are unsupported, and test console output does not reach traces or UI mode.

Written by

Akash Mohapatra

Akash Mohapatra

Co Founder & Director

16 Nov 2026

·

7 min read

Share

LET'S CONNECT

Connect with Creuto!

Ready to take the first step towards unlocking opportunities, realizing goals, and embracing innovation? We're here and eager to connect.