Cypress 5.0 - Unable to find installed browsers

不想你离开。 提交于 2021-01-27 13:00:35

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!