Нужно полностью отключить вывод в консоль от chromedriver.exe
.
Есть уже много подобных вопросов, но ни один из ответов не помог мне. Я пробовал добавлять такие параметры:
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
options.add_argument("--log-level=OFF")
options.add_argument("--disable-crash-reporter")
options.add_argument("--disable-extensions")
options.add_argument("--disable-in-process-stack-traces")
options.add_argument("--disable-logging")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--output=/dev/null")
options.add_experimental_option("useAutomationExtension", False)
options.add_experimental_option("excludeSwitches", ["enable-automation"])
driver = webdriver.Chrome(executable_path='chromedriver.exe', chrome_options=options)
Но вместо пустой консоли при запуске все равно получаю это:
PythonCode.py:30: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
driver = webdriver.Chrome(executable_path='chromedriver.exe', chrome_options=options)
PythonCode.py:30: DeprecationWarning: use options instead of chrome_options
driver = webdriver.Chrome(executable_path='chromedriver.exe', chrome_options=options)
DevTools listening on ws://127.0.0.1:54651/devtools/browser/be095b07-a924-4db1-8ccb-aa5612610fd5
driver.Chrome(...., service_log_path='nul')
. Для фф помогает, может и для хрома такое есть