Acamori
Acamori

Reputation: 347

How disable debuger on chrome webdriver in Python 3.x?

anybody know how to disable a debugger/logging in chrome webdriver in Python 3.6 ?

enter image description here

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

Answers (2)

user3104267
user3104267

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

Manmohan_singh
Manmohan_singh

Reputation: 1804

add this chrome_options.add_argument("--log-level=3") to shut the logging.

Upvotes: 5

Related Questions