cypress
16.3.0 · 10 Nov 2026MIT7.6M / weekRepositoryHomepagenpmAtom feed
16.3.0 is the newest release of 16.x.
In short
1 security1 new7 fixed4 changed
- Security
Upgraded
shell-quotefrom1.10.0to1.11.0to address a Command Injection vulnerability reported in security scans.shell-quoteis a transitive dependency oflaunch-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, socy.getByRole('button')finds a<button>but not a<div role="button">. Pass{ native: false }to also match elements with aroleattribute. 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 openand hung incypress 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 yieldedundefinedinstead of the window, and ignored itstimeoutoption 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()insetupNodeEvents, could intermittently be missing from the terminal output ofcypress runwhen written right after another line. Fixed in #35022.cy.get() now fails right away when you ask for index
0of a cy.intercept() alias, such ascy.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 runin 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
messagecannot be overwritten — such as theDOMExceptiona browser throws for a cross-origin access or a Content Security Policy violation — was reported asTypeError: 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
cyinstead 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 withCannot read properties of undefined (reading 'get'). Child commands called directly offcy, such ascy.click(), show the same reworded error. Fixed in #35024.Fixed an issue where
cypress runchanged the browser thatcypress openselects 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.searchParamsis now typed, socy.location('searchParams')andloc.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:
- Security
Upgraded
shell-quotefrom1.10.0to1.11.0to address a Command Injection vulnerability reported in security scans.shell-quoteis a transitive dependency oflaunch-editor. Addressed in #34960. - Security
Upgraded
simple-gitfrom3.36.0to4.0.2to address a Command Injection vulnerability and two Arbitrary Command Injection vulnerabilities (SNYK-JS-SIMPLEGIT-20335524, SNYK-JS-SIMPLEGIT-20335540) reported in security scans. This also upgrades its@simple-git/argv-parserdependency from1.1.1to2.0.1, which addresses a Command Injection vulnerability reported in security scans. Addressed in #34960.
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.