mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

Geckodriver log is always empty. #2122

Closed lanmaster53 closed 11 months ago

lanmaster53 commented 11 months ago

Issue

This is my configuration for Selenium that uses Geckodriver and Firefox.

# setup Firefox webdriver options
options = FirefoxOptions()
options.add_argument('-headless')
options.log.level = 'trace'
options.set_preference("devtools.console.stdout.content", True)
# inizialize Firefox webdriver
service = FirefoxService(log_path='/tmp/geckodriver.log', service_args=['--log', 'trace'])
driver = webdriver.Firefox(options=options, service=service)
driver.maximize_window()
driver.implicitly_wait(5) # removes the need for sleep calls
return driver

This configuration creates the log file in the desired location, but the log is always 0 bytes long. I have tried all kinds of different configurations, and the driver works just fine, but Geckodriver isn't creating any logs messages. Any help is greatly appreciated. Thank you.

System

Testcase

Anything.

Stacktrace

None.

Trace-level log

Empty.

lanmaster53 commented 11 months ago

Never mind. Looks like selenium python is aware and has fixed it in https://github.com/SeleniumHQ/selenium/commit/ab6e4f894d58bc3a0f82577e18a7e5f7d3388ccb.