Getting started with the Cypress framework
As noted earlier in the chapter, Cypress (https://www.cypress.io/) is by far the fastest and most adopted cross-browser frontend JavaScript testing framework. It is a developer-friendly, fast execution solution by design, and runs on the browser. In this section, we will learn how to install, set up, and run the first Cypress test in JavaScript. Note that Cypress also supports TypeScript and can be configured to run with the Cucumber BDD framework as well.
To get started with Cypress, please run the following command to install the node package on your machine:
npm install cypress --save-dev
Similar to Selenium and JavaScript, Cypress also requires Node.js to be installed on the local machine to run the Cypress tests. If you do not have Node.js installed, please make sure that, in addition to the installation of Cypress, you install it as a dependency as well.
Once the Cypress framework is installed, users can drive the tests either...