Cypress is built on Node.js based on which we are going to split this Cypress Installation into 3 ways i.e,
1. Installation of Node.js
2. Installation of VS code
3. Getting Dependent package and json creation
Installation of Node.js
1. Visit the following link https://nodejs.org/en/
2. Download the relevant package for your system and Install it.
3. Set the Environment variable for the Node.js and check its version.
Installation of VS code and Creating Project
1. Visit the following link https://code.visualstudio.com/download
2. Download the relevant package for your system and Install it.
3. Create a Project folder then import it into the VS Code
Open a explorer and create a new folder
Now open the VS Code and Click File ---> Open Folder or Ctrl+K Ctrl+O. Then browser and choose the folder we created.
Getting Dependent package and json creation
Method 1 : Installation via npm
To install the Cypress onto your system open command prompt and move to your project directory, you can also use the terminal provided in VS Code. Then enter the below command in it,
npm install cypress --save-dev
Method 2 : Direct Download
Visit the below link https://docs.cypress.io/guides/getting-started/installing-cypress.html#Install-pre-release-version and download the package. Unzip the package and navigate it the folder named Cypress.
Inside you will find a executable double click to open the executable. I will ask your to drag and drop the project folder into the Test Runner. Once imported run your test from it.
Installing Updates
Once you have installed, you will be notified when there is an update in the Cypress at you Test Runner itself
On clicking it will give you the instruction for updates. You have to quit the Test runner and run the commands displayed in the Test Runner in the command prompt
When you open our test runner again you will be opening the latest version.