Reputation: 3454
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
Upvotes: 10
Views: 13317
Reputation: 1
For me, Chrome was installed in my AppData. I moved the Chrome folder to Program Files, and it worked after that.
Upvotes: 0
Reputation: 51
it was working for me on window by following steps-
Upvotes: 1
Reputation: 176
Ran into the exact same error message. It's because the docker image does not have any of those browsers installed on it.
I solved it by just installing chrome onto the image I was using with these commands
RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb
you could also potentially link your chrome app to your container using the docker volumes but I figured the windows version of chrome wouldn't play nice in the linux image.
Upvotes: 2
Reputation: 21
I have faced similar issue in my organization and Symlink helped me to handle that. In my scenario the chrome brower was not installed in default folder where cypress looks for Chrome.exe ('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe','C:/Program Files/Google/Chrome/Application/chrome.exe')
When I tried below command with my installed chrome brower path:
npx cypress open --browser "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
It fails with error that unable to find browser at "C:\Program". It seems its splitting the --browser path with SPACE and fails to indentify the chrome browser.
So I created a symlink at default folder where cypress looks for chrome browser by default.
C:\mklink /J "C:\Program Files\Google\Chrome\Application" "C:\Program Files \Google Chrome (Local)"
Post completion of the Symlink I can see new path "C:\Program Files\Google\Chrome\Application" takes me to chrome.exe. Now I can run the cypess open command without browser tag and should see the chrome browser added in browser dropdown.
npx cypress open
Note:
Upvotes: 2
Reputation: 1709
I had same issue with Cypress 7.1.0. Cypress shows only Edge. I removed the app data described in here. After reinstalling the Google Chrome, Cypress show both of Chrome and Edge.
Upvotes: 0
Reputation: 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).
Upvotes: 0