From 57e15d3f982dbc886f979e8c485f08888e847490 Mon Sep 17 00:00:00 2001 From: Jonas Nicklas Date: Thu, 14 Nov 2013 22:25:00 +0100 Subject: [PATCH] Apparently focus manager is not enabled by default, /cc @TimMoore Guess I was wrong about this one, clearly still seeing failures with the latest selenium-webdriver, which are resolved by this. Guess I was wrong. Seems like some things are now fixed, but not everything. Very strange. --- spec/selenium_spec.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/selenium_spec.rb b/spec/selenium_spec.rb index 7de2545f..97112c13 100644 --- a/spec/selenium_spec.rb +++ b/spec/selenium_spec.rb @@ -1,7 +1,14 @@ require 'spec_helper' +require "selenium-webdriver" + +Capybara.register_driver :selenium_focus do |app| + profile = Selenium::WebDriver::Firefox::Profile.new + profile["focusmanager.testmode"] = true + Capybara::Selenium::Driver.new(app, browser: :firefox, profile: profile) +end module TestSessions - Selenium = Capybara::Session.new(:selenium, TestApp) + Selenium = Capybara::Session.new(:selenium_focus, TestApp) end Capybara::SpecHelper.run_specs TestSessions::Selenium, "selenium", :skip => [