Skip to content

Cypress - Supported Browsers

Cypress - Supported Browsers and Execution

Section titled “Cypress - Supported Browsers and Execution”

Cypress provides a seamless experience for running tests across multiple popular web browsers. This allows you to ensure your application works consistently for a wider audience.

Cypress supports a range of browsers, including:

  • Chrome (and Chromium-based browsers like Brave)
  • Edge (Chromium-based versions)
  • Electron (bundled with Cypress, default for cypress open initially)
  • Firefox (standard and Developer Edition)
  • WebKit (experimental support, for Safari-like testing)

Cypress automatically detects compatible browsers installed on your system. When you open the Cypress Test Runner (npx cypress open), you can typically choose your desired browser from a dropdown menu in the top right corner of the Test Runner window.

If a specific browser version is not listed, ensure you have a compatible version of that browser installed on your machine. Cypress generally works well with the latest stable versions.

  1. Open the Cypress Test Runner: npx cypress open

  2. In the Test Runner UI, locate the browser selection dropdown (usually in the header).

  3. Select the browser in which you want to run your tests.

  4. Click on a spec file to start the tests in the chosen browser.

The Test Runner will then launch the selected browser and execute your tests within it, providing live visual feedback.

For CI/CD pipelines or automated runs, you’ll use the cypress run command. By default, cypress run executes tests headlessly using the Electron browser.

To specify a different browser, use the --browser flag:

Run tests in Chrome (headless by default):

npx cypress run --browser chrome

Run tests in Firefox (headless by default):

npx cypress run --browser firefox

Run tests in Edge (headless by default):

npx cypress run --browser edge

By default, cypress run executes tests headlessly (no visible browser window). This is faster and preferred for CI environments.

To run tests in headed mode from the CLI (i.e., with the browser window visible), use the --headed flag:

npx cypress run --headed
// To run headed in a specific browser:
npx cypress run --browser chrome --headed

The Electron browser is always available as it’s bundled with Cypress and doesn’t need to be installed separately. Other browsers like Chrome, Firefox, and Edge must be installed on the system where Cypress is running.

For the most up-to-date list of supported browsers and their versions, always refer to the official Cypress documentation: Launching Browsers.