Skip to content
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

How to use default userDataDir on launch? #47

Closed
molant opened this issue Nov 7, 2017 · 4 comments · Fixed by #48
Closed

How to use default userDataDir on launch? #47

molant opened this issue Nov 7, 2017 · 4 comments · Fixed by #48

Comments

@molant
Copy link
Contributor

molant commented Nov 7, 2017

Is it possible to launch chrome without creating a new userDataDir?
From what I read in the documentation I will have to pass the user's current userDataDir as part of the launch options but that doesn't look OK to me. The developer will have to detect the platform and user name to generate the right path (C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default, Users/<username>/Library/Application Support/Google/Chrome/Default, /home/<username>/.config/google-chrome/default, for example).

The scenario I have in mind is to easily allow automation of some pages behind authentication if the user is already authenticated in there, for example.

Will you be open to have something to enable this? If so, what would be your preferred option? New parameter? Special value in userDataDir (maybe default)?

@patrickhulce
Copy link
Collaborator

Auto-detection of the user data dir is intriguing and would certainly be useful on occasion. I'd be against having it as the default though as many automation tasks would expect a clean environment rather than assuming the identity of the whoever happened to be running the script. An option with something like autodetect seems reasonable.

Not sure how others might feel about this.

@molant
Copy link
Contributor Author

molant commented Nov 7, 2017

I'd be against having it as the default

Yes, it shouldn't be.

Wouldn't chrome use the default if we remove the --user-data-dir parameter?

@patrickhulce
Copy link
Collaborator

Wouldn't chrome use the default if we remove the --user-data-dir parameter?

Oh yes! I thought you wanted to also have it returned to you, not just have Chrome use it 👍 even easier then :)

@molant
Copy link
Contributor Author

molant commented Nov 7, 2017

@patrickhulce there's a PR with the change in #48.
Hope everyone is OK with this.

molant added a commit to molant/chrome-launcher that referenced this issue Nov 8, 2017
molant added a commit to molant/chrome-launcher that referenced this issue Nov 13, 2017
molant added a commit to molant/chrome-launcher that referenced this issue Nov 13, 2017
molant added a commit to molant/chrome-launcher that referenced this issue Nov 13, 2017
molant added a commit to molant/chrome-launcher that referenced this issue Nov 14, 2017
molant added a commit to molant/chrome-launcher that referenced this issue Nov 14, 2017
molant added a commit to molant/chrome-launcher that referenced this issue Nov 14, 2017
molant added a commit to molant/chrome-launcher that referenced this issue Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants