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.
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 β
To run the execution in Firefox, run the command given below β
./node_modules/.bin/cypress run -- browser firefox
You can see the following screen β
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.