Skip to content

[🐛 Bug]: [py] log_types doesn't work with WebKitGTK #15587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cgoldberg opened this issue Apr 7, 2025 · 1 comment · Fixed by #15641
Closed

[🐛 Bug]: [py] log_types doesn't work with WebKitGTK #15587

cgoldberg opened this issue Apr 7, 2025 · 1 comment · Fixed by #15641
Labels
A-needs-triaging A Selenium member will evaluate this soon! C-py Python Bindings I-defect Something is not working as intended OS-linux

Comments

@cgoldberg
Copy link
Contributor

cgoldberg commented Apr 7, 2025

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
@cgoldberg cgoldberg added A-needs-triaging A Selenium member will evaluate this soon! I-defect Something is not working as intended labels Apr 7, 2025
@github-actions github-actions bot added C-py Python Bindings OS-linux labels Apr 7, 2025
@selenium-ci
Copy link
Member

@cgoldberg, thank you for creating this issue. We will troubleshoot it as soon as we can.

Selenium Triage Team: remember to follow the Triage Guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-needs-triaging A Selenium member will evaluate this soon! C-py Python Bindings I-defect Something is not working as intended OS-linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants