-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Firefox: logs().get( "browser" ) doesn't show console errors? #1161
Comments
The FirefoxDriver is not configured to capture JS console output. |
This issue can be resolved partially by installation of JSErrorCollector addon, but as far as I know it can catch only errors (not warnings). I hope to see this functional in future version of Selenium. 😃 |
Sounds interesting :) |
@axelssonHakan first search result on Google and GitHub. |
I am experiencing the same issue. My environment is Ubuntu 14.04 LTS, Firefox 42, Selenium Version 2.48.0. Here is my test html page: <!DOCTYPE HTML>
<html>
<head>
<script> console.log('console log'); </script>
</head>
<body></body>
</html> and my test python script from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
import time
d = DesiredCapabilities.FIREFOX
d['loggingPrefs'] = { 'browser':'ALL' }
driver = webdriver.Firefox(capabilities=d)
# chrome
# d = DesiredCapabilities.CHROME
# d['loggingPrefs'] = { 'browser':'ALL' }
# driver = webdriver.Chrome(desired_capabilities=d)
driver.get('http://localhost:8000/consolelog.html')
time.sleep(2) # time for page to load
logs = driver.get_log('browser')
messages = map(lambda l: l['message'], logs)
has_console_logs = any(map(lambda m: m.find('console log') >= 0, messages))
print('Success' if has_console_logs else 'Failure')
driver.quit() When the chrome driver is used the |
Same issue in my case, with the same versions. Still looking for a solution, even a workaround, since having the console after the tests have run is very precious for analysis of failures. I'm using Firefox because I have to support different OS and this was the easiest to support. |
Any update on this? |
Is there any update regarding to this issue? |
I am having the same issue with selenium 2.53.1 and firefox 45.3ESR |
+1 for this. |
can somehow outpass this?... any chance with using geckodriver? |
Same problem with GeckoDriver 0.16.1, FF-53.0.3, Selenium 3.4.0 |
@tttower Geckodriver does not support logging API yet, follow mozilla/geckodriver#284 to track status of this feature. |
Development of XPI-based Firefox driver has been discontinued and this issue will never be fixed in it. For the new geckodriver-based implementation follow mozilla/geckodriver#284 |
I'm trying to save the console logs after each test but having some problems with Firefox.
With a test like:
For Chrome I get the result nicely:
But Firefox only returns "Internal" warnings (CSS parse):
The text was updated successfully, but these errors were encountered: