Cypress v10 Practice
-
Install node most recent version https://nodejs.org/en/download/?utm_source=blog
-
cd cypressv10practice
-
npm install
-
cd project-name
-
npm init
-
npm install --save-dev [email protected]
- Cypress Test Runner:
npx cypress open
- Headless mode:
npx cypress run
- Non headless mode:
npx cypress run --headed
- Run into specific browser:
npx cypress run --browser chrome
- Run specific tests:
npx cypress run --spec cypress\e2e\{...}\spec_name.cy.js
Understand CSS selectors: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors
Understand XPath selectors: https://www.w3schools.com/xml/xpath_syntax.asp
Assertions with Cypress: https://docs.cypress.io/guides/references/assertions
Assertions with Chai: https://www.chaijs.com/