Sha256: 77613bfe70c34b20d6c262071240a5edbba335f252b48cdabb8092a3228eaeea

Contents?: true

Size: 1.3 KB

Versions: 47

Compression:

Stored size: 1.3 KB

Contents

module Selenium
  module WebDriver
    module Firefox

      # @api private
      class Bridge < Remote::Bridge

        def initialize(opts = {})
          port        = opts.delete(:port) || DEFAULT_PORT
          profile     = opts.delete(:profile)
          http_client = opts.delete(:http_client)

          @launcher   = create_launcher(port, profile)

          unless opts.empty?
            raise ArgumentError, "unknown option#{'s' if opts.size != 1}: #{opts.inspect}"
          end

          @launcher.launch

          remote_opts = {
            :url                  => @launcher.url,
            :desired_capabilities => Remote::Capabilities.firefox(:native_events => DEFAULT_ENABLE_NATIVE_EVENTS)
          }

          remote_opts.merge!(:http_client => http_client) if http_client

          super(remote_opts)
        end

        def browser
          :firefox
        end

        def driver_extensions
          [
            DriverExtensions::TakesScreenshot,
            DriverExtensions::HasInputDevices
          ]
        end

        def quit
          super
          @launcher.quit

          nil
        end

        private

        def create_launcher(port, profile)
          Launcher.new Binary.new, port, profile
        end

      end # Bridge
    end # Firefox
  end # WebDriver
end # Selenium

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/bridge.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/bridge.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/bridge.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/bridge.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.21.2 lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.21.2.rc1 lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.21.1 lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.21.0 lib/selenium/webdriver/firefox/bridge.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/firefox/bridge.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/firefox/bridge.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/firefox/bridge.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/firefox/bridge.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/selenium-webdriver-2.20.0/lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.20.0 lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.20.0.rc1 lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.19.0 lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.19.0.rc2 lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.19.0.rc1 lib/selenium/webdriver/firefox/bridge.rb
selenium-webdriver-2.18.0 lib/selenium/webdriver/firefox/bridge.rb