-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Passing custom Chrome profile directory (user data dir) not working on Mac and Linux #18308
Comments
@AJM-v Did you find a solution to this? We have a use case that also requires custom Chrome profiles, |
@AlexMurphy |
Same issue here on mac. |
Same issue on Windows, both |
This issue still happen on cypress version 12 when using the run command from the CLI such as Is there any workaround? |
I can tell that Cypress is intentionally overwriting this arg here. https://github.com/cypress-io/cypress/blob/develop/packages/server/lib/browsers/chrome.ts#L692 But there seems to be no escape hatch to chose it yourself. |
Our case also requires this approach (we are setting up mic permissions before test). export default (on, config) => {
on('before:browser:launch', (browser = {}, launchOptions) => {
launchOptions.args.push('--user-data-dir=../chromeProfile/Default');
})
} |
We have the same requirement. We are trying to run VSCode (Electron) with cypress and we need to override --user-data-dir |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue is a blocker for many things for us and it's still occurring. |
We did add an option recently to I haven't tried this specific use case, but it may be an option to opt out of the overwriting behavior that is causing problems with Cypress overwriting. Interested to hear if that works for anyone. |
I can confirm It doesn't work. Cypress still overwrites the |
Current behavior
We would like to use a custom Chrome profile directory for our Cypress tests. The application we are testing uses a Web SQL database which needs to be loaded into the Chrome browser. We tried this command which should be a valid chromium argument.
launchOptions.args.push('--user-data-dir=/Users/testuser/dev/chrome')
But when we run Cypress we see that the Chrome Profile Path is being overwritten by Cypress:
Desired behavior
The Chrome Profile Path from the launchOptions
'--user-data-dir=/Users/testuser/dev/chrome'
is used.Test code to reproduce
Our setup:
The code we tried in our index.js (plugins folder):
Steps to reproduce:
chrome://version
in URL barCypress Version
8.4.0
Other
Also tested on a Windows 10 environment and there this code is working fine when testing headed in Chrome.
The text was updated successfully, but these errors were encountered: