diff --git a/packages/axe-core-capybara/lib/axe-capybara.rb b/packages/axe-core-capybara/lib/axe-capybara.rb index eea79426..85b232b7 100644 --- a/packages/axe-core-capybara/lib/axe-capybara.rb +++ b/packages/axe-core-capybara/lib/axe-capybara.rb @@ -25,6 +25,6 @@ def self.configure(browser = :firefox) private def self.get_driver(browserSymbol) - Capybara::Selenium::Driver.new(browserSymbol) + Capybara::Selenium::Driver.new nil, :browser => browserSymbol end end diff --git a/packages/axe-core-capybara/spec/axe-capybara_spec.rb b/packages/axe-core-capybara/spec/axe-capybara_spec.rb index f01371ff..388308d4 100644 --- a/packages/axe-core-capybara/spec/axe-capybara_spec.rb +++ b/packages/axe-core-capybara/spec/axe-capybara_spec.rb @@ -27,6 +27,14 @@ }.to yield_with_args(actual) end + # Default is firefox, so we can just check that we can override the default + it "sets browser" do + driver = AxeCapybara.configure(:chrome) do + end + is_chrome = driver.page.execute_script "return !!window.chrome" + expect(is_chrome).to be true + end + it "should yield configuration with specified jslib path" do different_axe_path = "different-axe-path/axe.js"