Reputation: 347
anybody know how to disable a debugger/logging in chrome webdriver in Python 3.6 ?
I'm trying following code and it isn't working.
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--disable-infobars")
chrome_options.add_argument("--disable-logging")
chrome_options.add_argument("--disable-login-animations")
chrome_options.add_argument("--disable-notifications")
chrome_options.add_argument("--disable-default-apps")
driver = webdriver.Chrome(chrome_options=chrome_options, service_log_path='NUL', service_args=["--verbose", r"--log-path=D:\qc1.log"])
Python ver.: 3.6.1
Chrome Browser ver.: 62.0.3202.94 (64bit)
Webdriver ver.: 2.33
OS: Win10 (64bit)
Upvotes: 3
Views: 3859
Reputation: 190
In C# this didn't work for me anymore. In Selenium 4 you can configure now the LogLevel by a SetLevel call, see https://www.selenium.dev/documentation/webdriver/troubleshooting/logging
Upvotes: 0
Reputation: 1804
add this chrome_options.add_argument("--log-level=3")
to shut the logging.
Upvotes: 5