Member-only story
Cross-Browser Testing with Cypress
In my previous Medium article, I shared you about Cypress for Test Automation from Scratch. Then I shared some information about Cypress version10 and how you can run the all specs files.
In this article, I will focus on how to do cross-browser testing with Cypress. For this, I will give an examples from the cypress training video series that I mentioned on my YouTube channel before. If you haven’t watched it yet, you can find the whole series here.
We were creating specific customized scripts in package.json. First of all, you’ve opened your project then opened the package.json file. Then we’re going to add comma at the end of the scripts and will create a new script after browsers scripts.
For example for Chrome, Firefox, Edge and Electron we can add these scripts:
"allTests-chrome": "npx cypress run --browser chrome",
"allTests-firefox": "npx cypress run --browser firefox",
"allTests-edge": "npx cypress run --browser edge",
"allTests-electron": "npx cypress run --browser electron",