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

Enable browser logging to get console.log #241

Closed
ElSnoMan opened this issue Mar 28, 2022 Discussed in #238 · 2 comments
Closed

Enable browser logging to get console.log #241

ElSnoMan opened this issue Mar 28, 2022 Discussed in #238 · 2 comments
Labels
enhancement New feature or request

Comments

@ElSnoMan
Copy link
Owner

Discussed in #238

Originally posted by szabolcslevay March 28, 2022
How can I set up the below capability/option in pylenium.json?

# enable browser logging
d = DesiredCapabilities.CHROME
d['goog:loggingPrefs'] = { 'performance':'ALL' }
driver = webdriver.Chrome(desired_capabilities=d)

or even better, as ChromeOptions

options = webdriver.ChromeOptions()
options.set_capability("goog:loggingPrefs", {"performance": "ALL"})
driver = webdriver.Chrome(options=options)
```</div>
@ElSnoMan ElSnoMan added the enhancement New feature or request label Mar 28, 2022
@ElSnoMan
Copy link
Owner Author

Paraphrased answer from Discussion:

DesiredCapabilities are deprecated, but it seems we did not add the replacement with options. In the end, you would only need to update the dictionary via the CLI or pylenium.json.

For example:

{
  "driver": {
    "browser": "chrome",
    "remote_url": "",
    "wait_time": 10,
    "page_load_wait_time": 0,
    "options": [],
    "capabilities": {
      "goog:loggingPrefs": { "performance": "ALL" }
    },
    ...
}

@ElSnoMan
Copy link
Owner Author

Changes released in v1.14.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant