1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Only W3C is supported in Selenium 4

This commit is contained in:
Thomas Walpole 2019-04-17 23:03:11 -07:00
parent a436a83064
commit e137980d4d

View file

@ -8,7 +8,8 @@ module Capybara::Selenium::Driver::FirefoxDriver
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