-
Notifications
You must be signed in to change notification settings - Fork 786
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
Add support for profile-directory
command line option
#963
base: master
Are you sure you want to change the base?
Conversation
Add support `profile-directory` command line option
// This folder contains the profile specific data like cookies & cache. | ||
// If multiple profile exists they are typically named "Profile 1", | ||
// "Profile 2", etc. | ||
func UserDataProfile(profile string) ExecAllocatorOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ProfileDirectory
is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was a little bit concerned about the ambiguity there. Because the word "directory" might imply that you need to specify a full path.
I think that this is a actually a rare enough use case as well as being potentially confusing enough, to cancel this pull request.
If someone needs the feature they can always just use chromedp.Flag
:
opts := []chromedp.ExecAllocatorOption{
chromedp.UserDataDir("/home/user/.config/google-chrome"),
chromedp.Flag("profile-directory", "Profile 2"),
}
ctx, cancel := chromedp.NewExecAllocator(context.Background(), opts...)
defer cancel()
ctx, cancel = chromedp.NewContext(ctx)
defer cancel()
I think maybe providing an example in /examples
might be a better alternative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is a actually a rare enough use case as well as being potentially confusing enough, to cancel this pull request.
Yes, I can not think of a use case for this option.
@@ -424,6 +424,17 @@ func UserDataDir(dir string) ExecAllocatorOption { | |||
return Flag("user-data-dir", dir) | |||
} | |||
|
|||
// UserDataProfileDir is the command line option to set the profile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UserDataProfileDir
-->ProfileDirectory
the profile subdirectory under the UserData directory
-->the profile directory under the user data directory
No description provided.