question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Ability to set instance prefs and localState in addition to args

See original GitHub issue

I want to provide Chrome instance with prefs/localState. Using ChromeDriver’s chromeOptions (https://sites.google.com/a/chromium.org/chromedriver/capabilities) I could set something like this:

prefs: {
    download: {
        prompt_for_download: false,
        default_directory: DOWNLOAD_PATH,
    }
},
localState: {
    browser: {
        "enabled_labs_experiments": [
            // All preferences can be found here: https://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/pref_names.cc?view=markup
            "enable-native-notifications@2",
        ],
    }
},

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: https://github.com/GoogleChrome/puppeteer/issues/1577

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
skyieacommented, May 16, 2018

@berstend As far as I recall I managed to shift localState by modifying /Profile X/Local State file (there was some cryptic notation, which I understood by analyzing existing props in localState file). I guess you are right, about the deprecation. In the recent Chrome version I can’t find the file anymore.

PS: thanks for popping out extras, looks promising! I guess it resolves this feature request, and we can close it now.

1reaction
skyieacommented, Jan 9, 2018

@aslushnikov Yeah, will look into this next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Capabilities and EdgeOptions - Microsoft Edge Development
This article describes all supported capabilities for Microsoft Edge and provides details about passing the capabilities to EdgeDriver sessions.
Read more >
Writing query resolvers | Full-Stack Quickstart - Apollo GraphQL
Whenever a client queries for a particular field, the resolver for that field fetches the requested data from the appropriate data source. A...
Read more >
How To Manage State in React with Redux - DigitalOcean
In this tutorial, you'll use Redux in a React application by building a bird watching test application. Users will be able to add...
Read more >
Taints and Tolerations | Kubernetes
Node affinity is a property of Pods that attracts them to a set of nodes (either as a preference or a hard requirement)....
Read more >
List of Chromium Command Line Switches - Peter Beverloo
Some change behavior of features, others are for debugging or experimenting. ... be able to observe consistent reads if no /prefetch:# arguments were...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found