Add function to capture console logs from selenium browser.
See original GitHub issueI 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:
- Created 8 years ago
- Reactions:5
- Comments:23 (14 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Can I see browser console messages inside robotframework log if I ‘Open Browser’ or ‘Create Webdriver’ passing desired capabilities?