Sha256: 8fb9f5884a04dafc585a2f3a849ff2e723e0ca0347b21e231263a1e10ca098c2

Contents?: true

Size: 774 Bytes

Versions: 4

Compression:

Stored size: 774 Bytes

Contents

module Selenium
  module WebDriver
    module Chrome

      describe Driver do
        it "should accept an array of custom command line arguments" do
          begin
            driver = Selenium::WebDriver.for :chrome, :args => ["--user-agent=foo;bar"]
            driver.navigate.to url_for("click_jacker.html")

            ua = driver.execute_script "return window.navigator.userAgent"
            ua.should == "foo;bar"
          ensure
            driver.quit if driver
          end
        end

        it "should raise ArgumentError if :args is not an Array" do
          lambda {
            Selenium::WebDriver.for(:chrome, :args => "--foo")
          }.should raise_error(ArgumentError)
        end
      end

    end # Chrome
  end # WebDriver
end # Selenium

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
browserstack-webdriver-2.40.1 spec/integration/selenium/webdriver/chrome/driver_spec.rb
browserstack-webdriver-0.0.22 spec/integration/selenium/webdriver/chrome/driver_spec.rb
browserstack-webdriver-0.0.1 spec/integration/selenium/webdriver/chrome/driver_spec.rb
bbc-selenium-webdriver-1.17.0 spec/integration/selenium/webdriver/chrome/driver_spec.rb