Packages

cypress

16.3.0 · 10 Nov 2026MIT7.6M / weekRepositoryHomepagenpmAtom feed

Your version

16.2.0

14 Oct 2026Where it was published

16.3.0 is the newest release of 16.x.

In short

1 security1 new7 fixed4 changed

  • Security

    Upgraded shell-quote from 1.10.0 to 1.11.0 to address a Command Injection vulnerability reported in security scans. shell-quote is a transitive dependency of launch-editor. Addressed in #34960.

Release note

16.2.0​

Released Oct 13, 2026

Features:

  • Added the cy.getByRole() query, which finds elements by their ARIA role and, optionally, their accessible name, for example cy.getByRole('tab', { name: 'Billing' }). Elements hidden from the accessibility tree are skipped unless you pass { hidden: true }. For a role that HTML has an element for, only that element matches by default, so cy.getByRole('button') finds a <button> but not a <div role="button">. Pass { native: false } to also match elements with a role attribute. Like cy.get(), it yields every match and retries until its assertions pass. When nothing matches, the error lists the roles and accessible names on the page. Addressed in #34937.

Bugfixes:

  • Fixed a regression in 16.0.0 where a configured clientCertificates entry was not presented for requests the browser issued in Chrome, Chromium, and Edge, so an origin requiring mutual TLS showed a certificate prompt in cypress open and hung in cypress run. Fixes #34807.

  • Fixed a regression in 15.20.0 where a cookie changed by cy.request() or cy.setCookie() was sent to the server with its earlier value on the next navigation of the application under test, even though cy.getCookie() reported the new one. Fixes #34891.

  • Fixed a regression in 15.0.0 where cy.go() finished before the page it navigated to had loaded. The next command could run against the page being navigated away from, so tests that went back or forward could fail intermittently. cy.go() also yielded undefined instead of the window, and ignored its timeout option and pageLoadTimeout. cy.go() now waits for the page to load, yields the window, and fails if the page does not load within the timeout. Fixes #32460.

  • Fixed a regression in 15.0.0 where output written to stderr from your config file, such as console.error() in setupNodeEvents, could intermittently be missing from the terminal output of cypress run when written right after another line. Fixed in #35022.

  • cy.get() now fails right away when you ask for index 0 of a cy.intercept() alias, such as cy.get('@getUsers.0'). Previously, Cypress retried until the command timed out before it showed the error, even though retrying could never succeed. Fixed in #34936.

  • Fixed an issue where chapter markers in videos recorded during cypress run in Chrome-based browsers, Electron, and Firefox were placed later than the tests they label when the browser was slow to show its first frame. In that case the video could also report a longer length than its footage and show a frozen final frame. Fixed in #35018.

  • Fixed an issue where an error whose message cannot be overwritten — such as the DOMException a browser throws for a cross-origin access or a Content Security Policy violation — was reported as TypeError: setting getter-only property "message" from inside Cypress, hiding the error that actually failed the test. Fixes #34818.

  • Fixed an issue where, after one request missed its browser pre-request, every later request with the same method and URL waited the full 2 second pre-request timeout for the rest of the spec. Fixes #34966.

  • Fixed an issue where cy.prompt and Studio could fail to load. Fixed in #35013.

  • Calling a query that needs a subject, such as .eq(), .first(), .find(), or .shadow(), directly off cy instead of chaining it off a command that yields a subject now fails right away with an error that names the command and explains that it must be chained. Previously, Cypress retried until the command timed out and then reported that the subject was not a DOM element, or, when the query was the first command in a test, failed with Cannot read properties of undefined (reading 'get'). Child commands called directly off cy, such as cy.click(), show the same reworded error. Fixed in #35024.

  • Fixed an issue where cypress run changed the browser that cypress open selects by default for a project to whichever browser the run used, such as the one passed with --browser. Fixed in #34924.

Misc:

  • TypeScript now types the object yielded by cy.location() as the plain object Cypress actually yields, instead of the browser's window.location. searchParams is now typed, so cy.location('searchParams') and loc.searchParams.get('q') no longer report a type error. Addressed in #34956.

  • Masked the environment variable values on the Project settings page. Addressed in #35004.

Dependency Updates:

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.