diff --git a/lib/capybara/selenium/driver.rb b/lib/capybara/selenium/driver.rb index 92eaa149..71407ddd 100644 --- a/lib/capybara/selenium/driver.rb +++ b/lib/capybara/selenium/driver.rb @@ -15,7 +15,7 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base def browser unless @browser if firefox? - options[:desired_capabilities] ||= Selenium::WebDriver::Remote::Capabilities.firefox + options[:desired_capabilities] ||= {} options[:desired_capabilities].merge!({ unexpectedAlertBehaviour: "ignore" }) end diff --git a/spec/selenium_spec_marionette.rb b/spec/selenium_spec_marionette.rb index ff728567..217e9cef 100644 --- a/spec/selenium_spec_marionette.rb +++ b/spec/selenium_spec_marionette.rb @@ -8,7 +8,7 @@ Capybara.register_driver :selenium_marionette do |app| Capybara::Selenium::Driver.new( app, browser: :firefox, - desired_capabilities: Selenium::WebDriver::Remote::Capabilities.firefox(marionette: true) + desired_capabilities: {marionette: true} ) end @@ -16,7 +16,7 @@ Capybara.register_driver :selenium_marionette_clear_storage do |app| Capybara::Selenium::Driver.new( app, browser: :firefox, - desired_capabilities: Selenium::WebDriver::Remote::Capabilities.firefox(marionette: true), + desired_capabilities: {marionette: true}, clear_local_storage: true, clear_session_storage: true )