From 0421f53831891322000bd254ae863294d4d79649 Mon Sep 17 00:00:00 2001 From: Alex Rodionov Date: Mon, 12 Apr 2021 11:22:15 -0700 Subject: [PATCH] Grab CDP version from capabilities when using remote --- rb/lib/selenium/webdriver/remote/driver.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rb/lib/selenium/webdriver/remote/driver.rb b/rb/lib/selenium/webdriver/remote/driver.rb index a837c48a01ce1..d2f3e69f8258f 100644 --- a/rb/lib/selenium/webdriver/remote/driver.rb +++ b/rb/lib/selenium/webdriver/remote/driver.rb @@ -49,6 +49,10 @@ def initialize(bridge: nil, listener: nil, **opts) def devtools_address capabilities['se:cdp'] end + + def devtools_version + capabilities['se:cdpVersion'].split('.').first + end end # Driver end # Remote end # WebDriver