Obsolete
Status Update
Comments
kh...@chromium.org <kh...@chromium.org> #2
DesiredCapabilities are obsolete, please use Chrome options.
from selenium import webdriver
import time, os, sys
try:
chrome_options = webdriver.ChromeOptions()
browser=webdriver.Chrome( options=chrome_options, executable_path="/<path>/chromedriver",
service_args=["--verbose", "--log-path=/<path>/Issue2976.log"])
browser.get("https://fili.cc ")
time.sleep(10)
for entry in browser.get_log('browser'):
print(entry)
browser.close()
browser.quit()
except Exception as e:
print("Exception!")
print e
exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
print(exc_type, fname, exc_tb.tb_lineno)
browser.quit()
from selenium import webdriver
import time, os, sys
try:
chrome_options = webdriver.ChromeOptions()
browser=webdriver.Chrome( options=chrome_options, executable_path="/<path>/chromedriver",
service_args=["--verbose", "--log-path=/<path>/Issue2976.log"])
browser.get("
time.sleep(10)
for entry in browser.get_log('browser'):
print(entry)
browser.close()
browser.quit()
except Exception as e:
print("Exception!")
print e
exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
print(exc_type, fname, exc_tb.tb_lineno)
browser.quit()
jo...@chromium.org <jo...@chromium.org> #3
Using DesiredCapabilities class is OK. It's not obsolete. The reason the original code doesn't work is 'loggingPrefs' isn't a standard-compliant capability name, and must be replaced with 'goog:loggingPrefs'. The standard requires browser-specific capability names be tagged with a vendor name prefix.
to...@gmail.com <to...@gmail.com> #4
It does work with goog:loggingPrefs, thanks for the responses.
Where is this specified? It's difficult to find information on this in Selenium.
Where is this specified? It's difficult to find information on this in Selenium.
kh...@chromium.org <kh...@chromium.org> #6
[Empty comment from Monorail migration]
is...@google.com <is...@google.com> #7
This issue was migrated from crbug.com/chromedriver/2976?no_tracker_redirect=1
[Monorail components added to Component Tags custom field.]
[Monorail components added to Component Tags custom field.]
Description
Issue Description:
Using chromium version 75.0.3770.100-1, the loggingPrefs option to get full logs does not work anymore: only 'SEVERE' logs are returned with python-selenium's get_log() when logginPrefs is set to 'ALL'.
On Arch Linux, downgrading to chromium-74.0.3729.169-2 fixes the issue.
Steps to reproduce:
See attached example file. Returns only 2 'SEVERE' messages with chromium 75, while chromium 74 returns 2 'SEVERE' and 10 'INFO' messages on example website.
I should also note that INFO logs are not displayed even if produced by a first-party script.