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
[Feature request] Ability to set instance prefs and localState in addition to args #1693
Comments
No, there's no such API for now, mostly because there's not much demand for it. Out of curiosity, what's your usecase for this? |
@aslushnikov Yeah, I thought about starting messing with await browser.launch();
await driver.browser.setPrefs({ ... }); // messing with /userDataDir via `fs`
// will browser automatically apply new prefs here? I guess not :\ ATM I have 2 use-cases, which I'm covering with
So I see prefs / localState as addition to args, which gives me more control over the functionality. |
@skyiea no, this won't work: the prefs should be written before the browser is launched.
This probably deserves a PR: you should be able to pass prefs as an argument to the Are you interested in working on this? |
@aslushnikov Yeah, will look into this next week. |
@skyiea Did you manage to get PS: I've made this wrapper to set instance prefs as your PR won't be merged into puppeteer. |
@berstend As far as I recall I managed to shift PS: thanks for popping out extras, looks promising! I guess it resolves this feature request, and we can close it now. |
I want to provide Chrome instance with
prefs
/localState
. Using ChromeDriver'schromeOptions
(https://sites.google.com/a/chromium.org/chromedriver/capabilities) I could set something like this:Is it possible to do the same with puppeteer? (I saw the workaround for setting download dir through
_client
, but the question is more general)Here is related issue: #1577
The text was updated successfully, but these errors were encountered: