Skip to content

[πŸ› Bug]: Unable to hide DevTools listening on wsΒ #13095

@MohamedV0

Description

@MohamedV0

What happened?

I'm working on a Selenium script to automate browser tasks, and I've run into an issue regarding the DevTools message. When I use the --headless option, the following message keeps appearing in the console:

"DevTools listening on ws://127.0.0.1:51481/devtools/browser/505e7f66-fd69-494b-a733-0cce438dec53"

However, the message successfully disappears when I remove the --headless option.

How can we reproduce the issue?

from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ['enable-logging'])
options.add_argument("--log-level=3")
options.add_argument("start-maximized")
options.add_argument("--headless")
driver = webdriver.Chrome(options=options)
input("")

Relevant log output

DevTools listening on ws://127.0.0.1:51481/devtools/browser/505e7f66-fd69-494b-a733-0cce438dec53

Operating System

Windows 11

Selenium version

Python 3.11.4 selenium 4.15.1

What are the browser(s) and version(s) where you see this issue?

Chrome Version 119.0.6045.106 (Official Build) (64-bit)

What are the browser driver(s) and version(s) where you see this issue?

Chrome Version 119.0.6045.106 (Official Build) (64-bit)

Are you using Selenium Grid?

no

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyPython BindingsG-chromedriverRequires fixes in ChromeDriverI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions