Module: Capybara::Selenium::Driver::FirefoxDriver

Defined in:
lib/capybara/selenium/driver_specializations/firefox_driver.rb

Class Method Summary collapse

Class Method Details

.extended(driver) ⇒ Object



6
7
8
# File 'lib/capybara/selenium/driver_specializations/firefox_driver.rb', line 6

def self.extended(driver)
  driver.extend Capybara::Selenium::Driver::W3CFirefoxDriver if w3c?(driver)
end

.w3c?(driver) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/capybara/selenium/driver_specializations/firefox_driver.rb', line 10

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