2

I'm almost done with my bachelor thesis about e2e testing. I can test almost anything but i cant record.

I did what everything what is documented on cypress.docs

On the picture below you ca see i set a project, which is private i got the key command to run cypress record but when i open powershell und put the command in, i get this shitty error message (the pic below) which i have no clue about and i cant find anything on the internet, cause it seems like everybody useres mac or linux for running cypress

Please help. how can i solve this?

Screenshot

  • It appears that the directory containing the `cypress` executable is not in your `PATH` variable. Either add the directory to the `PATH` or specify the fully qualified path to the `cypress` executable in the command. – lit Mar 12 '19 at 15:05

1 Answers1

0

export is a bash keyword to set an environment variable. The Powershell equivalent is:

$env:VARIABLE_NAME=value

Or use

Set-Item -path env:VARIABLE_NAME -value 'value'

Cypress must be installed and part of the path in order to be executed. It looks like it isn't at the moment, hence PowerShell complains it can't find any command or executable matching Cypress. You should probably install NodeJS and then execute:

npm install cypress -g

to make cypress available globally in Windows.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
  • Hmm but i installed cypress via npm in powershell, i also installed node.js both have different paths. –  Mar 12 '19 at 15:03
  • while the cypress path with all needed folders is on desktop the node.js path is located to my program files can i just drag and drop the projects and files? what would you recommend @jessehouwing –  Mar 12 '19 at 15:04
  • 1
    If you install cypress, but not globally you'll need to run it from `.\node_modules\cypress.cmd` or `.\node_modules\.bin\cypress.cmd`... – jessehouwing Mar 12 '19 at 15:05
  • or you can edit your `PATH` environment variable to include the path where your cypress executable is stored. – jessehouwing Mar 12 '19 at 15:06