-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cypress --browser
option not working on Windows when given a path
argument
#6389
Comments
@amrkamel1 how did you install Firefox? I haven't seen it at this path before. Currently, Cypress will only look for Firefox installed in Program Files, which is why you are running into this. |
Actually, it seems like |
--browser
option not working for Firefox on Windows
I spent some time looking in to why This logic in the cypress/packages/launcher/lib/detect.ts Lines 163 to 170 in 9103292
This works for Linux and macOS, because Since The core issue here is that there needs to be some way for the launcher to determine what browser is passed. There could be a naive check, like if the path contains "firefox", assume it's firefox. Or there could be a convention like Open to ideas on how to detect the browser type, so |
Nothing regular flow i have downloaded firefox installer then install it by default it went to that path stating above and its not in programeFiles but anyway will try again install it in program files update : its working fine when i have changed the path to |
For me it hangs after below and nothing happen. Windows 10
|
Users on (annoying) Windows GPOs, such as myself, will often have Firefox installed in their user-local |
@AaronRohrbacher I haven't tried it, but I believe this should work in the meantime if you add it to your plugins file: module.exports = (on, config) => {
// ...
config.browsers.push({
name: 'firefox',
family: 'firefox',
channel: 'stable',
displayName: 'Firefox',
version: '73.0.1',
path: 'C:\\Users\\[windows user name]\\AppData\\Local\\Mozilla Firefox\\firefox.exe',
majorVersion: '73'
})
return config
} https://docs.cypress.io/guides/guides/launching-browsers.html#Customize-available-browsers |
--browser
option not working for Firefox on Windows--browser
option not working on Windows
Will this work for cypress run? The docs only mention it for cypress open. I would need it to work with run for CI. And does it have to be an absolute path? This isn't much of a workaround for actual projects if so :/ |
I've answered my own question, it does not have to be an absolute path and it does work with cypress run |
--browser
option not working on Windows--browser
option not working on Windows when given a path
argument
After discussing with the team a bit, I think the way we can go about fixing this issue on Windows is using the For example, for these paths:
|
We are facing the same problem. When trying to use chromium, it looks like the |
Ran into this earlier today and started to look into this. @flotwig would your suggested fix of using the executable name work in the case of chrome vs chromium given both would be detected as chrome? (both are chrome.exe by default). From a WMIC perspective both Chrome and Chromium appear identical so is hard to detect between the two. The only difference in the two is the author field ("The Chromium Authors" vs "Google LLC") which feels a little hacky, but would provide enough of a basis to differentiate. |
Good point, though it would only be a cosmetic issue, Chrome and Chromium are treated identically in Cypress.
We could use the filename matching in addition to an extra WMIC column to determine if it's Chromium or Chrome based on the author field... ...this is starting to feel kinda hacky, I think we just need a way for users to specify the browser's
|
Hey, Any update on that? workarounds are not working for me? |
@codenamics Nobody from the team is currently working on this, but we would welcome a PR that implements the fix described in #6389 (comment) |
Hi, |
I'd like to give this a shot. |
@Zacharias3690 feel free to go ahead and open a PR. Tag me if you have any questions about the repo that are not answered by the |
The code for this is done in cypress-io/cypress#8743, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
im running the following command after updating cyrpess to 4.0.1
npm run cypress --browser c:\Users\amrka\appData\local\Mozilla Fireforx\firefox.exe
but still unable to see firefix among the list of browser in cypress
part of the log
C:\Users\amrka\Desktop\ATT MNC\mc-testing-framework>npm run cypress --browser c:\Users\amrka\appData\local\Mozilla Fireforx\firefox.exe
Desired behavior:
I should be able to see firefox among browser list in cypress
Versions
Firefox
The text was updated successfully, but these errors were encountered: