<commit_before>require 'spec_helper'

module TestSessions
  Selenium = Capybara::Session.new(:selenium, TestApp)
end

Capybara::SpecHelper.run_specs TestSessions::Selenium, "selenium", :skip => [
  :response_headers,
  :status_code,
  :trigger
]

describe Capybara::Session do
  context 'with selenium driver' do
    before do
      @session = TestSessions::Selenium
    end

    describe '#driver' do
      it "should be a selenium driver" do
        @session.driver.should be_an_instance_of(Capybara::Selenium::Driver)<commit_msg>Apparently focus manager is not enabled by default, /cc @TimMoore<commit_after>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_focus, TestApp)
end

Capybara::SpecHelper.run_specs TestSessions::Selenium, "selenium", :skip => [
  :response_headers,
  :status_code,
  :trigger
]

describe Capybara::Session do
  context 'with selenium driver' do
    before do
      @session = TestSessions::Selenium
    end

    describe '#driver' do
      it "should be a selenium driver" do
        @session.driver.should be_an_instance_of(Capybara::Selenium::Driver)
{'fraction_non_alphanumeric': 0.10457516339869281, 'fraction_numerical': 0.0, 'mean_word_length': 5.0174672489082965, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6573878', 'n_tokens_mistral': 464, 'n_tokens_neox': 442, 'n_words': 104}