Cypress - Supported Browsers


Cypress can run tests in browsers like Chrome, Electron, and Firefox. In the Test Runner,we have the option to choose the browser from the right upper corner.

Also, it must be noted that if a browser option is not available, it means we do not have the latest version of that browser in our system.

Cypress Electron

Execution from Other Browsers

The execution from other browsers from Command Line is explained below −

To run the execution in Chrome, you need to run the below mentioned command −

./node_modules/.bin/cypress run -- browser chrome

You can see the following screen −

Execution in Chrome

To run the execution in Firefox, run the command given below −

./node_modules/.bin/cypress run -- browser firefox

You can see the following screen −

Execution in Headed Mode,

To run the execution in headed mode, run the command given below −

./node_modules/.bin/cypress run -- headed

From the command line, Cypress executes tests in headless mode, if no option is specified.

Advertisements