Python硒:DevTools在ws://127.0.0.1上侦听 [英] Python selenium: DevTools listening on ws://127.0.0.1
问题描述
今天,当使用chromedriver运行硒时,我在控制台上收到了此消息.我该如何抑制呢?
Today I got this message on the console when running selenium using the chromedriver. How do I suppress this?
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版得到了相同的消息.
I get the same message using version 2.30 of chromedriver.
我以前没有收到此消息.我所做的唯一更改是将chrome更新到版本62.0.3202.94(正式版本)(64位)
I have not previously received this message. The only change I've made is updating chrome to Version 62.0.3202.94 (Official Build) (64-bit)
Python 3.6.3 64,硒3.4.3,Windows 7 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
推荐答案
我遇到了同样的问题,做了一些挖掘,最后找到了一个可行的解决方案.这应该删除弹出的DevTools
消息:
I had the same issue, did a bit of digging and finally found a working solution. This should remove the DevTools
message popping up:
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(executable_path='<path-to-chrome>', options=options)
根据此铬问题中的解决方案
这篇关于Python硒:DevTools在ws://127.0.0.1上侦听的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!