gpt4 book ai didi

python Selenium : DevTools listening on ws://127. 0.0.1

转载 作者:太空狗 更新时间:2023-10-29 18:34:50 31 4
gpt4 key购买 nike

今天我在使用 chromedriver 运行 selenium 时在控制台上收到这条消息。我该如何抑制它?

DevTools listening on ws://127.0.0.1:12740/devtools/browser/97101fe4-3b1f-42b0-b5c8-373cc18040b6

相关代码:

from selenium import webdriver
driver = webdriver.Chrome(executable_path='c:/bin/chromedriver233')

我使用 chromedriver 2.30 版时收到相同的消息。

我以前没有收到过这条消息。我所做的唯一更改是将 chrome 更新到版本 62.0.3202.94(官方构建)(64 位)

Python 3.6.3 64 位,selenium 3.4.3,Windows 7 64 位。

编辑:我在 https://productforums.google.com/forum/#!topic/chrome/Dlk2j_JpmxE;context-place=forum/chrome 上向 Chrome 产品论坛发布了一个问题。

最佳答案

我遇到了同样的问题,进行了一些挖掘,最终找到了可行的解决方案。这应该删除弹出的 DevTools 消息:

options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(executable_path='<path-to-chrome>', options=options)

根据 this chromium issue 的解决方案.

关于 python Selenium : DevTools listening on ws://127. 0.0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47392423/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com