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.

Add function to capture console logs from selenium browser.

See original GitHub issue

I was wondering if you could add this function to your _browsermanagement.py file? This will enable the selenium tests to pull information straight from the developer console. This feature will give a better picture of what is going on with the back end when running these kind of tests within a frame buffer like XVFB.

def printMyLogs(self): sampleLogsArray = [] for entry in self._current_browser().get_log(‘browser’): print entry sampleLogsArray.append(entry)

    return sampleLogsArray

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:5
  • Comments:23 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
aaltatcommented, Jan 9, 2020

The SeleniumTestability plugin has this keyword and it supports more browsers then is supported by the Selenium. Therefore closing this issue.

If there is a new need, we can consider implementing this feature in SeleniumLibrary too.

0reactions
arsen-tcommented, Feb 14, 2020

Can I see browser console messages inside robotframework log if I ‘Open Browser’ or ‘Create Webdriver’ passing desired capabilities?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Capturing browser logs with Selenium WebDriver using Java
LogEntries logs = driver.manage().logs().get(LogType.BROWSER);. For me it worked wonderfully for catching JS errors in console. Then you can ...
Read more >
Selenium 4 Features - Retrieving Browser Console Log Using ...
Selenium 4 Features – Retrieving Browser Console Log Using Selenium WebDriver · LogType is a class which provides you static final constants such ......
Read more >
Capture Console Logs - New feature Selenium 4
Capture Console Logs – New feature Selenium 4 · In an application, the javascript related errors will be captured​​ as logs​​ in the...
Read more >
I want the console log output from Chrome I m working with ...
I want the console log output from Chrome I m working with selenium on Python · case CHROME: System.setProperty( · "webdriver.chrome.logfile" · " ......
Read more >
Selenium to get browser console log - Qxf2 BLOG
"Get the browser console log" try: log = ; self.driver.get_log ; return log except Exception ...
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