Installing Cypress on Windows
In this section, we will install Cypress and Node.js on Windows operating systems so that we can run our tests.
Downloading and installing Node.js
The following steps will guide you through the installation of Node.js:
- Visit the official Node.js website (https://nodejs.org/en/download/).
- Select the Windows installer option.
- Download the installer package.
- Install the Node.js package by following the instructions on the Node.js website.
Next, let's initialize the project.
Initializing the project
As a best practice, Cypress is installed in the directory where the project is located; that way, we can be sure that the Cypress tests belong to the project. In our case, we will create a folder inside Documents
and call it cypress-tests
, then navigate to that directory when installing Cypress. We can use the following commands in a Windows PowerShell terminal to create the cypress-tests
directory and navigate to it...