- Make sure you are on latest version of node
5.8.+
- Create a folder
testcypress
- Navigate to the Folder in the terminal and run
npm init
in terminal, this will create apackage.json
- Now let's Install cypress by running the command
npm install cypress --save
make sure to be in thetestcypress
folder - Next, let's open the cypress in our chrome browser
npx cypress open
- This will open the cypress app / browser and create a folder called cypress with example tests inside it.
- When you click on the check mark it will run all the test per spec file.
npx cypress open
to open cypressnpx cypress run
to run headless browser
- Uncaught exceptions
in support/ index.js add the following
Cypress.on('uncaught:exception', (err, runnable) => { // returning false here prevents Cypress from // failing the test return false });