diff --git a/lib/capybara/selenium/driver.rb b/lib/capybara/selenium/driver.rb index 02e229842e..9b62a64b55 100644 --- a/lib/capybara/selenium/driver.rb +++ b/lib/capybara/selenium/driver.rb @@ -45,6 +45,7 @@ def browser end end processed_options = options.reject { |key, _val| SPECIAL_OPTIONS.include?(key) } + @browser = Selenium::WebDriver.for(options[:browser], processed_options) specialize_driver diff --git a/lib/capybara/spec/session/driver_spec.rb b/lib/capybara/spec/session/driver_spec.rb index 71a35268d6..74b7240d1d 100644 --- a/lib/capybara/spec/session/driver_spec.rb +++ b/lib/capybara/spec/session/driver_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true Capybara::SpecHelper.spec 'Driver' do - context "freeze_page", requires: %i[freeze js] do + context 'freeze_page', requires: %i[freeze js] do it 'can pause a page' do @session.visit('/with_js') @session.find(:css, '#clickable').click