Python selenium: DevTools listening on ws://127.0.

2019-04-24 14:40发布

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

Relevant code:

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

I get the same message using version 2.30 of chromedriver.

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, selenium 3.4.3, Windows 7 64.

EDIT: I posted a question to the Chrome product forum at https://productforums.google.com/forum/#!topic/chrome/Dlk2j_JpmxE;context-place=forum/chrome

1条回答
劳资没心,怎么记你
2楼-- · 2019-04-24 15:16

Not sure if you are aware but try:

options.add_argument('--log-level=3')

Mind you I'm using headless, though I believe you could configure this for normal browser. It feels better :). I was amazed at how annoying that notification message was.

查看更多
登录 后发表回答