简体   繁体   English

Selenium Chromedriver禁用Windows登录

[英]Selenium Chromedriver disable log on Windows

I am running selenium via python 3 with the chromedriver browser on windows 10 . 我在Windows 10上使用chromedriver浏览器通过python 3运行selenium

The program is very active and should run constantly. 该计划非常活跃,应该不断运行。 Means: lots of logging going on. 意思是:正在进行大量的日志记录。

Problem : the crhomedriver logs get way too long after a few hours, and windows tends to crash. 问题 :crhomedriver日志在几个小时后变得太长,而且窗户往往会崩溃。

在此输入图像描述

Everything is working fine, the logs are just minor issues about which I do not really care. 一切都很好,日志只是我不太关心的小问题。

Question : 问题

How may I disable the chromedriver logs? 我怎样才能禁用chromedriver日志?

Notes : 备注

  • I did my research and did not find any working solution yet. 我做了我的研究,但还没有找到任何有效的解决方案。
  • I am forced to use chromedriver, hence no headless browser like phantomJS is a valid alternative. 我被迫使用chromedriver,因此像phantomJS这样的无头浏览器是一个有效的选择。

Try this, not sure it will work. 试试这个,不确定它会起作用。 Pass the options to your chromedriver 将选项传递给您的chromedriver

from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument('--disable-logging')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python Selenium - 在 cmd 中禁用 Chromedriver 日志消息 - Python Selenium - Disable Chromedriver log message in cmd 使用 chromedriver 禁用 Selenium Python 中的图像 - Disable images in Selenium Python with chromedriver Python3 Selenium ChromeDriver禁用仅记录Pyinstaller Windows 10的扩展 - Python3 Selenium ChromeDriver Disable Extensions Logging Only Pyinstaller Windows 10 如何在 Selenium Chromedriver 中禁用/启用“另存为”对话框? - How to disable/enable "Save as" dialog in Selenium Chromedriver? Python:在Selenium Google ChromeDriver中禁用图片 - Python: Disable images in Selenium Google ChromeDriver Selenium 元素不可交互按钮(Python、Windows、Chromedriver) - Selenium element not interactable button (Python, Windows, Chromedriver) Python 3 硒 | 剪贴板不适用于 Windows 上的无头 chromedriver - Python 3 Selenium | Clipboard not working on headless chromedriver on Windows Selenium 单击带有奇怪文本的按钮(windows、chromedriver) - Selenium click button with weird text (windows, chromedriver) Python Selenium Chromedriver 无法禁用图像加载 - Python Selenium Chromedriver Can't disable images to load Selenium 和 chromedriver - Selenium and chromedriver
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM