提问人:Parth Shah 提问时间:9/16/2023 最后编辑:Parth Shah 更新时间:9/16/2023 访问量:23
如何删除“对于常规浏览...在 Selenium Grid 上运行 selenium webdriver 脚本时下载 Chrome“信息消息
How to remove "For regular browsing... Download Chrome" info message while running selenium webdriver scripts on Selenium Grid
问:
在Selenium Grid - Remote Server上运行脚本时,始终看到以下信息消息。
Selenium Grid Jar: selenium-server-4.12.1.jar
$ python3 --version
Python 3.10.12
$ chromedriver --version
ChromeDriver 117.0.5938.62 (25a7172909a4cba7355365cf424d7d7eb35231f4-refs/branch-heads/5938@{#1146})
options = webdriver.ChromeOptions()
options.add_argument("--start-maximized")
options.add_argument('--log-level=1')
options.add_argument("--disable-extensions")
options.add_argument("--disable-gpu")
options.add_argument("--no-sandbox")
options.add_argument('--ignore-ssl-errors=yes')
options.add_argument('--ignore-certificate-errors')
options.add_argument("--disable-infobars")
options.add_argument("--kiosk")
options.add_argument("--disable-blink-features")
options.add_argument("--disable-blink-features=AutomationControlled")
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
prefs = {"credentials_enable_service": False,
"profile.password_manager_enabled": False,
"safebrowsing.enabled": False}
options.add_experimental_option("prefs", prefs)
caps = options.to_capabilities()
wd = webdriver.Remote(command_executor=remote_hub_address, options=options)
有什么方法可以删除此消息吗?
答: 暂无答案
评论