Skip to content

[πŸ› Bug]: [py] log_types doesn't work with WebKitGTKΒ #15587

@cgoldberg

Description

@cgoldberg

Description

Accessing the driver.log_types property when using WebKitGTK doesn't work and returns an error.

Reproducible Code

from selenium import webdriver

driver = webdriver.WebKitGTK()
print(driver.log_types)

Debugging Logs

DEBUG:selenium.webdriver.common.driver_finder:Skipping Selenium Manager; path to MiniBrowser driver specified in Service class: /usr/bin/WebKitWebDriver
DEBUG:selenium.webdriver.common.service:Started executable: `/usr/bin/WebKitWebDriver` in a child process with pid: 14725 using 0 to output -3
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:57229/session {'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'MiniBrowser', 'pageLoadStrategy': <PageLoadStrategy.normal: 'normal'>, 'webkitgtk:browserOptions': {'useOverlayScrollbars': True}}}}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:57229
DEBUG:urllib3.connectionpool:http://localhost:57229 "POST /session HTTP/1.1" 200 0
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=200 | data={"value":{"sessionId":"c978ae59-20c6-409d-9b1e-6ae26fae155e","capabilities":{"browserName":"MiniBrowser","browserVersion":"2.48","platformName":"linux","acceptInsecureCerts":false,"strictFileInteractability":false,"setWindowRect":true,"unhandledPromptBehavior":"dismiss and notify","pageLoadStrategy":"normal","proxy":{},"timeouts":{"script":30000,"pageLoad":300000,"implicit":0}}}} | headers=HTTPHeaderDict({'Server': 'WebKitWebDriver', 'Date': 'Mon, 07 Apr 2025 17:08:49 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'no-cache', 'Content-Length': '382'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:GET http://localhost:57229/session/c978ae59-20c6-409d-9b1e-6ae26fae155e/se/log/types {}
DEBUG:urllib3.connectionpool:http://localhost:57229 "GET /session/c978ae59-20c6-409d-9b1e-6ae26fae155e/se/log/types HTTP/1.1" 404 0
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=404 | data={"value":{"error":"unknown command","message":"Unknown command: /session/c978ae59-20c6-409d-9b1e-6ae26fae155e/se/log/types","stacktrace":""}} | headers=HTTPHeaderDict({'Server': 'WebKitWebDriver', 'Date': 'Mon, 07 Apr 2025 17:08:50 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'no-cache', 'Content-Length': '141'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
Traceback (most recent call last):
  File "/home/cgoldberg617/code/selenium/py/sel.py", line 22, in <module>
    print(driver.log_types)
          ^^^^^^^^^^^^^^^^
  File "/home/cgoldberg617/code/selenium/py/selenium/webdriver/remote/webdriver.py", line 1175, in log_types
    return self.execute(Command.GET_AVAILABLE_LOG_TYPES)["value"]
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/cgoldberg617/code/selenium/py/selenium/webdriver/remote/webdriver.py", line 429, in execute
    self.error_handler.check_response(response)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/cgoldberg617/code/selenium/py/selenium/webdriver/remote/errorhandler.py", line 232, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Unknown command: /session/c978ae59-20c6-409d-9b1e-6ae26fae155e/se/log/types

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-pyPython BindingsI-defectSomething is not working as intendedOS-linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions