Open
Description
What happened?
Using the Python bindings, the WPE WebKit browser functionality seems totally broken. Trying to instantiate webdriver.WPEWebKit()
results in:
selenium.common.exceptions.InvalidArgumentException: Message: Invalid alwaysMatch capabilities
(Note: WPE WebKit is only available on Linux)
How can we reproduce the issue?
Run the following code:
from selenium import webdriver
driver = webdriver.WPEWebKit()
(Make sure WPE WebKit is installed. On Debian/Ubuntu, install with `sudo apt install wpewebkit-driver`)
Relevant log output
DEBUG:selenium.webdriver.common.driver_finder:Skipping Selenium Manager; path to MiniBrowser driver specified in Service class: /usr/bin/WPEWebDriver
DEBUG:selenium.webdriver.common.service:Started executable: `/usr/bin/WPEWebDriver` in a child process with pid: 20817 using 0 to output -3
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:56037/session {'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'MiniBrowser', 'pageLoadStrategy': <PageLoadStrategy.normal: 'normal'>, 'wpe:browserOptions': {}}}}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:56037
DEBUG:urllib3.connectionpool:http://localhost:56037 "POST /session HTTP/1.1" 400 0
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=400 | data={"value":{"error":"invalid argument","message":"Invalid alwaysMatch capabilities","stacktrace":""}} | headers=HTTPHeaderDict({'Server': 'WebKitWebDriver', 'Date': 'Tue, 01 Apr 2025 01:09:00 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'no-cache', 'Content-Length': '99'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
Traceback (most recent call last):
File "/home/cgoldberg617/code/selenium/py/sel.py", line 13, in <module>
driver = webdriver.WPEWebKit()
File "/home/cgoldberg617/code/selenium/py/selenium/webdriver/wpewebkit/webdriver.py", line 49, in __init__
super().__init__(command_executor=self.service.service_url, options=options)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cgoldberg617/code/selenium/py/selenium/webdriver/remote/webdriver.py", line 250, in __init__
self.start_session(capabilities)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/home/cgoldberg617/code/selenium/py/selenium/webdriver/remote/webdriver.py", line 342, in start_session
response = self.execute(Command.NEW_SESSION, caps)["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.InvalidArgumentException: Message: Invalid alwaysMatch capabilities
Operating System
Linux (Debian Stable)
Selenium version
4.30
What are the browser(s) and version(s) where you see this issue?
WPE WebKit
What are the browser driver(s) and version(s) where you see this issue?
wpewebkit-driver 2.38.6-1 (installed from Debian Stable Apt repo)
Are you using Selenium Grid?
No