Skip to content

Commit

Permalink
Only W3C is supported in Selenium 4
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Apr 18, 2019
1 parent a436a83 commit e137980
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ def self.extended(driver)
end

def self.w3c?(driver)
driver.browser.capabilities.is_a?(::Selenium::WebDriver::Remote::W3C::Capabilities)
(defined?(Selenium::WebDriver::VERSION) && (Selenium::WebDriver::VERSION.to_f >= 4)) ||
driver.browser.capabilities.is_a?(::Selenium::WebDriver::Remote::W3C::Capabilities)
end
end

Expand Down

0 comments on commit e137980

Please sign in to comment.