Setup & Configuration on Windows platform. Some of these steps are windows specific and not required if Cypress IDE is already setup.
- installed node.js from here.
- installed various dependencies that were part of the routine.
- installed visual Studio code for Windows.
- Could not run the scripts on Windows as policy was set to Restricted. Changed the policy to Unrestricted. See details how to do here.
- Modified the Windows firewall to allow cypress.exe thru. Check your Windows firewall on how to allow an app to go thru.
- When I ran the test first time, I got the error "EEXIST: file already exists - cannot start server on Windows".
- Error is reported here
- Added "test": "cypress open" under scripts
- Run the following in the cli
npm run test
- Make sure you have Cypress compatible browser installed on your computer. Browsers listed here.
- Backup your existing
json
files in the project folder, and then clone the repo to the same location as yournode_modules
folder of Cypress framework. - In the CLI, navigate to root of the project folder and run the following command to start the Cypress Server.
./node_modules/.bin/cypress open
- This should invoke Cypress application to the frontend, and you will see file called
youtube.spec.js
file. - click on this
youtube.spec.js
file so Cypress can invoke the browser to run this test. - Once the test suite is invoked, it will run and then finish successfully.