Which browsers can Cypress 16 launch, and how do you pick one for a run?
answer
- Three engine families, not four
- One of them is only an experiment
- One of them is on its way out
- A CLI flag picks the browser per run
- defaultBrowser fills in when the flag is absent
basics
~20 sCypress 16 launches Chrome-family browsers - Chrome, Chrome for Testing, Chromium and Edge - plus Firefox, experimental WebKit, and the deprecated bundled Electron. Choose one per run with the --browser flag, or set defaultBrowser in the Cypress config.
solid answer
~40 sAs of Cypress 16, three engine families are drivable. The **Chromium** family covers Chrome, Chrome Beta, Chrome Canary, Chrome for Testing, Chromium itself and Microsoft Edge in stable, beta, dev and canary channels. The **Firefox** family covers Firefox, Firefox Developer Edition and Firefox Nightly, but only version 140 or newer. **WebKit**, Safari's engine, exists only as an experiment behind `experimentalWebKitSupport`. The bundled **Electron** browser still runs but is deprecated in Cypress 16 and will be removed. Cypress officially supports the latest three majors of Chrome, Firefox and Edge. Select one with `cypress run --browser edge`, add a release channel with a colon (`chrome:canary`), or pass a filesystem path for a build Cypress did not auto-detect. With no flag, Cypress uses `defaultBrowser`, and falls back to Electron when that is unset.
code
bash · 10 lines# what did Cypress detect on this machine?
npx cypress info
# pick a browser explicitly, per run
npx cypress run --browser chrome --spec cypress/e2e/statement-list.cy.js
npx cypress run --browser firefox --spec cypress/e2e/statement-list.cy.js
npx cypress run --browser edge:dev --spec cypress/e2e/statement-list.cy.js
# a build Cypress did not auto-detect, launched by path
npx cypress run --browser /usr/bin/chromium --headedgo deeper
Be ready to name the browser families Cypress can launch and to select one from the command line. Interviewers use this as a warm-up before anything harder about the runner.
Explain how Cypress detects browsers on the machine, what a channel suffix such as chrome:canary selects, and which setting decides the browser when no flag is passed.
Show how you make the browser explicit in CI so a run never depends on whatever the image happens to contain, and how you spot a browser that is present but outside the supported window.
Own the team-wide default: which browser a run uses when nobody passes a flag, where that default is written down, and who is accountable when a browser drifts out of support.
Cypress launches and controls its own browser instance rather than attaching to one you already have open, so the list of browsers a suite can cover is fixed by what Cypress knows how to automate. As of **Cypress 16.0.0** that list is short and worth knowing exactly. ## The engine families Cypress 16 drives - **Chromium family** (`Cypress.browser.family === 'chromium'`) - Chrome, Chrome Beta, Chrome Canary, **Chrome for Testing**, Chromium, and Microsoft Edge in stable, beta, dev and canary channels. - **Firefox family** (`family === 'firefox'`) - Firefox, Firefox Developer Edition and Firefox Nightly. - **WebKit** (`family === 'webkit'`) - Safari's rendering engine, available only as an opt-in experiment via the `experimentalWebKitSupport` configuration option. - **Electron** - the Chromium build bundled inside Cypress itself. It reports `family: 'chromium'`, and Cypress 16 **deprecates it as a test browser**; it will be removed in a future major version. Cypress auto-detects what is installed on the machine, so a suite driving a bank statement app normally needs no browser paths configured at all: it walks the well-known binary names for each browser above, reads a version out of each one it finds, and offers the result. `cypress info` prints what was found on that machine, which is the fastest way to answer "why is Edge not in the list" on a CI agent you cannot see. ## Choosing one for a run | `--browser` value | Family | Status in Cypress 16 | | --- | --- | --- | | `chrome`, `chrome:beta`, `chrome:canary` | `chromium` | Supported | | `chrome-for-testing` | `chromium` | Supported, pinned build | | `chromium` | `chromium` | Supported | | `edge`, `edge:beta`, `edge:dev`, `edge:canary` | `chromium` | Supported | | `firefox`, `firefox:dev`, `firefox:nightly` | `firefox` | Supported, version 140+ only | | `webkit` | `webkit` | Experimental, opt-in | | `electron` | `chromium` | Deprecated, removal planned | Cypress resolves which browser to launch in a fixed order: 1. A `--browser` value on the command line wins - a name (`chrome`), a name plus release channel (`edge:dev`), or a filesystem path such as `/usr/bin/chromium`. 2. Otherwise the `defaultBrowser` configuration option, if the project sets one. 3. Otherwise the bundled Electron browser - which is exactly the fallback Cypress 16 wants you to stop relying on. In `cypress open` you pick from a dropdown near the top right instead, and the browser is always headed there so you can watch the run. During `cypress run` every browser starts **headless** by default - Electron through its own headless mode, Chrome, Chromium and Edge with `--headless=new`, Firefox with `-headless`, and WebKit headless through Playwright. `--headed` shows the browser, and `--headless` forces it back. That default is why `cypress run` works on a CI machine with no display attached. ## Which versions count as supported Cypress officially supports the **latest three major versions** of Chrome, Firefox and Edge. These browsers are evergreen and their automation interfaces move quickly, so the window is deliberately narrow. One hard stop sits inside it: Cypress cannot launch **Firefox older than 140** at all, and refuses with an error naming the version to install. The consequence for a CI image is that "we installed a browser once" is not a finished job. An evergreen browser moves under a suite, an old pinned one falls out of the window, and both show up as a Cypress problem long before anyone suspects the browser. Chrome for Testing exists as the deliberate answer to the first half of that, and `--browser chrome-for-testing` selects it. ## Reacting to the browser from inside a spec Sometimes a statement page genuinely renders differently per engine and one assertion has to bend: - `Cypress.browser` exposes `name`, `family`, `channel`, `version`, `majorVersion`, `displayName`, `path`, `isHeaded` and `isHeadless`. - `Cypress.isBrowser('firefox')` matches by name, `Cypress.isBrowser('!chrome')` inverts it, an array matches several, and an object filters on properties such as `{ family: 'chromium' }`. - Cypress's test configuration takes a `browser` option, so `describe('embedded PDF viewer', { browser: 'firefox' }, ...)` runs a suite only under Firefox. Reach for these sparingly. Branching a spec per browser is how a suite quietly stops asserting the same behaviour everywhere. ## What is not on the list - **Safari itself cannot be launched.** Experimental WebKit runs Safari's *engine*, obtained from Playwright's `playwright-webkit` package; it is not the Safari application, and it does not carry Safari's own UI behaviour. - **Internet Explorer and real mobile browsers are not options.** Cypress launches desktop browser binaries on the machine running the test. - **A browser Cypress cannot detect is not automatically excluded.** You can pass its path to `--browser`, or add an entry to the `browsers` array returned from `setupNodeEvents` so it appears in the open-mode dropdown; filtering that array is also how you *remove* browsers a team should not use. The practical takeaway for a suite covering a bank statement app: Chromium browsers and Firefox are first-class, WebKit is a partial preview of Safari, and Electron is a fallback you should be actively leaving.
- How do you launch a Chromium build that Cypress does not auto-detect?Pass a filesystem path to `--browser` instead of a name, for example `cypress run --browser /usr/bin/chromium`. Cypress inspects the binary, works out which browser it is, and launches it. To have it listed in `cypress open` as well, append an entry to the `browsers` array returned from `setupNodeEvents` with `name`, `family`, `channel`, `displayName`, `version`, `majorVersion` and `path`.
- How do you run one Cypress suite only in Firefox?Use Cypress's test configuration `browser` option on the suite or test: `describe('statement viewer', { browser: 'firefox' }, ...)` runs it only under Firefox, and `{ browser: '!firefox' }` runs it everywhere else. Inside a test, `Cypress.isBrowser('firefox')` and `Cypress.browser.family` let you branch. A suite excluded this way simply does not run in the other browsers.
saying these in an interview costs you the question
- Claims Cypress can launch Safari itself on macOS
- Thinks WebKit is available by default in Cypress
- Says Cypress drives any browser with a WebDriver server
- Believes Electron is the recommended browser for CI