SeleniumHQ/selenium · error · Error::WebDriverError
DevTools is not supported by the Remote Server
Error message
DevTools is not supported by the Remote Server
What it means
Raised as Error::WebDriverError by Remote::Driver#devtools_version when the 'se:cdpVersion' capability is absent or its first dot-separated segment cannot be parsed as a CDP version integer. The method splits the capability on '.', takes the first element, and if it is nil (capability missing or empty) raises this error. It indicates the remote server does not expose Chrome DevTools Protocol support.
Source
Thrown at rb/lib/selenium/webdriver/remote/driver.rb:64
@bridge.extend(WebDriver::Remote::Features)
@bridge.add_commands(command_list)
end
private
def assert_arguments(service, url, http_client, client_config)
raise ArgumentError, "Can not set :service object on #{self.class}" if service
raise ArgumentError, 'Cannot use both :http_client and :client_config' if http_client && client_config
raise ArgumentError, 'Cannot use both :url and a ClientConfig#server_url' if url && client_config&.server_url
end
def devtools_url
capabilities['se:cdp']
end
def devtools_version
cdp_version = capabilities['se:cdpVersion']&.split('.')&.first
raise Error::WebDriverError, 'DevTools is not supported by the Remote Server' unless cdp_version
Integer(cdp_version)
end
def process_options(options, capabilities)
if options && capabilities
msg = "Don't use both :options and :capabilities when initializing #{self.class}, prefer :options"
raise ArgumentError, msg
elsif options.nil? && capabilities.nil?
raise ArgumentError, "#{self.class} needs :options to be set"
end
options ? options.as_json : generate_capabilities(capabilities)
end
def generate_capabilities(capabilities)
Array(capabilities).map { |cap|
if cap.is_a? Symbol
cap = WebDriver::Options.send(cap)View on GitHub (pinned to aa36b38e69)
Solutions
- Verify the remote session is backed by a Chromium-based browser (Chrome or Edge) that supports CDP.
- Check capabilities['se:cdpVersion'] is present after session creation; if nil, the server does not support DevTools.
- Ensure the Selenium Server / Grid version is recent enough to populate se:cdpVersion and se:cdp capabilities.
- Use BiDi (driver.bidi) instead of DevTools if you need cross-browser automation on non-Chromium browsers.
Example fix
# before driver = Selenium::WebDriver.for(:remote, url: grid_url, capabilities: Selenium::WebDriver::Remote::Capabilities.firefox) driver.devtools # raises — Firefox has no CDP # after driver = Selenium::WebDriver.for(:remote, url: grid_url, capabilities: Selenium::WebDriver::Remote::Capabilities.chrome) driver.devtools # works
Defensive patterns
Strategy: validation
Validate before calling
# Check CDP capability before using DevTools: unless driver.capabilities['se:cdpVersion'] raise 'DevTools unavailable — remote node is not Chromium or lacks CDP support' end driver.devtools
Type guard
def devtools_available?(driver)
!driver.capabilities['se:cdpVersion'].nil? &&
driver.capabilities['se:cdpVersion'].split('.').first&.match?(/\A\d+\z/)
end Try / catch
begin
driver.devtools
rescue Selenium::WebDriver::Error::WebDriverError => e
raise unless e.message.include?('DevTools is not supported')
# fall back to BiDi or skip DevTools-dependent logic
driver.bidi
end Prevention
- Use Chromium-based browsers (Chrome/Edge) when you need DevTools on Remote.
- Check se:cdpVersion in capabilities before calling DevTools APIs.
- Consider WebDriver BiDi for cross-browser low-level automation.
When it happens
Trigger: Calling driver.devtools or any DevTools-dependent API on a remote session where the server (e.g. a non-Chromium grid node, or a server without CDP extension capabilities) did not return 'se:cdpVersion'. Connecting to a Selenium Grid running a Firefox-only or Safari-only node. Using a remote endpoint that strips vendor capabilities.
Common situations: Pointing at a Grid whose nodes don't run Chrome/Edge (CDP is Chromium-only). Connecting to a third-party cloud provider that doesn't forward se:cdpVersion. Browser version mismatches where the driver couldn't detect the CDP version. Calling DevTools APIs on a Safari or Firefox remote session.
Related errors
- CDP devtools module not loaded. Call import_devtools() first
- CDP version not found in capabilities
- Unable to find url to connect to from capabilities
- CDP module not loaded
- command_executor must be a RemoteConnection instance for CDP
AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14).
Data as JSON: /api/errors/af9531ef19da35e1.
Report an issue: GitHub.