Sha256: 8e96d377ac5a636ec96f9872e79f82acc435053cfc2a62ab24c315ea27c368de

Contents?: true

Size: 641 Bytes

Versions: 18

Compression:

Stored size: 641 Bytes

Contents

module Spreewald
  module DriverInfo

    def javascript_capable?
      selenium_driver? || poltergeist_driver? || webkit_driver?
    end

    def selenium_driver?
      Object.const_defined?('Capybara::Selenium') && Capybara.current_session.driver.is_a?(Capybara::Selenium::Driver)
    end

    def poltergeist_driver?
      Object.const_defined?('Capybara::Poltergeist') && Capybara.current_session.driver.is_a?(Capybara::Poltergeist::Driver)
    end

    def webkit_driver?
      Object.const_defined?('Capybara::Webkit') && Capybara.current_session.driver.is_a?(Capybara::Webkit::Driver)
    end

  end
end

World(Spreewald::DriverInfo)

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
spreewald-2.4.2 lib/spreewald_support/driver_info.rb
spreewald-2.4.0 lib/spreewald_support/driver_info.rb
spreewald-2.3.0 lib/spreewald_support/driver_info.rb
spreewald-2.2.4 lib/spreewald_support/driver_info.rb
spreewald-2.2.3 lib/spreewald_support/driver_info.rb
spreewald-2.2.2 lib/spreewald_support/driver_info.rb
spreewald-2.2.1 lib/spreewald_support/driver_info.rb
spreewald-2.2.0 lib/spreewald_support/driver_info.rb
spreewald-2.1.3 lib/spreewald_support/driver_info.rb
spreewald-2.1.2 lib/spreewald_support/driver_info.rb
spreewald-2.1.1 lib/spreewald_support/driver_info.rb
spreewald-2.1.0 lib/spreewald_support/driver_info.rb
spreewald-2.0.0 lib/spreewald_support/driver_info.rb
spreewald-1.12.6 lib/spreewald_support/driver_info.rb
spreewald-1.12.5 lib/spreewald_support/driver_info.rb
spreewald-1.12.4 lib/spreewald_support/driver_info.rb
spreewald-1.12.3 lib/spreewald_support/driver_info.rb
spreewald-1.12.2 lib/spreewald_support/driver_info.rb