Skip to content

Commit 2b4f9d8

Browse files
committed
[rb] Cast DevTools version to integer when used with Grid
1 parent 6bbd4e4 commit 2b4f9d8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rb/lib/selenium/webdriver/remote/driver.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ def devtools_url
4545
end
4646

4747
def devtools_version
48-
capabilities['se:cdpVersion']&.split('.')&.first ||
49-
raise(Error::WebDriverError, 'DevTools is not supported by the Remote Server')
48+
cdp_version = capabilities['se:cdpVersion']&.split('.')&.first
49+
raise Error::WebDriverError, 'DevTools is not supported by the Remote Server' unless cdp_version
50+
51+
Integer(cdp_version)
5052
end
5153

5254
def process_options(options, capabilities)

0 commit comments

Comments
 (0)