StanM
StanM

Reputation: 869

Turn off 'POST'/'GET' log entries from chromedriver

Currently I am using 'logging' module for chromedriver

Chrome initialization parameters are:

options = webdriver.ChromeOptions()
options.add_argument("--start-maximized")
options.add_argument("disable-infobars")
options.add_argument("--disable-logging")
options.add_argument("--silent")
options.add_argument("--log-level=3")

context.driver = webdriver.Chrome(executable_path="./resources/chromedriver", chrome_options=options)

I tried the above arguments in hopes that would get rid of the 'POST' and 'GET' logs I keep seeing. Example of stuff I want to get rid of but have no clue what turns these off:

2018-01-30 17:35:41,871 : DEBUG:GET http://127.0.0.1:62516/session/37f7905cb48936e8dea1926aa119afcd/element/0.7136428266323058-2/displayed {"id": "0.7136428266323058-2", "sessionId": "37f7905cb48936e8dea1926aa119afcd"}
2018-01-30 17:35:41,886 : DEBUG:Finished Request

Upvotes: 3

Views: 839

Answers (1)

StanM
StanM

Reputation: 869

After spending a few hours of doing searches and it not working finally found the relevant SO answer: Turning off logging in Selenium (from Python)

Additional item I needed to do is this:

from selenium.webdriver.remote.remote_connection import LOGGER
LOGGER.setLevel(logging.WARNING)

Upvotes: 3

Related Questions