How do I disable geckodriver's log on Selenium (Python 3)? How do I disable geckodriver's log on Selenium (Python 3)? selenium selenium

How do I disable geckodriver's log on Selenium (Python 3)?


A little late to answer this, but I had the same question just now. I found the solution buried in this issue on their Github repository. To change the target of the log you can use

import osfrom selenium import webdriver# to create a driver with no logdriver = webdriver.Firefox(service_log_path=os.devnull)# or to just rename the log filedriver = webdriver.Firefox(service_log_path='my-app.log')

Initially I got a deprecation warning when I used the keyword argument log_path (as suggested in the issue) but that will vary on the version you're using. I'm using selenium==3.141.0.