问题
I have Cypress 5.0 installed and have all the browsers - Chrome, Edge and FF. When I run
> npx cypress open
Not able to see all the browsers on the top right corner. Only Electron is showing
I tried
> npx cypress open --browser chrome
I get the following error
Can't run because you've entered an invalid browser name.
Browser: 'chrome' was not found on your system or is not supported by Cypress.
Cypress supports the following browsers:
- chrome
- chromium
- edge
- electron
- firefox (Cypress support in beta)
You can also use a custom browser: https://on.cypress.io/customize-browsers
Available browsers found on your system are:
- electron
I also tried
> npx cypress open --browser C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Cypress shows the error - We could not identify a known browser at the path you provided
One of my other machine, I am able to see all the browsers from get go.
Any help will be appreciated
回答1:
I was having the same issue with Jenkins and solved it just by adding C:\\Windows\\System32\\wbem
to my PATH
in the pipeline script (in the withEnv
section).
来源:https://stackoverflow.com/questions/63731593/cypress-5-0-unable-to-find-installed-browsers