Fix running IE tests on CI

This commit is contained in:
Aleksei Gusev 2018-03-25 19:55:36 +03:00
parent e755161e13
commit 200ea0a94d
3 changed files with 9 additions and 1 deletions

View File

@ -4,6 +4,7 @@ gem 'bundler', '~> 1.1'
gemspec
gem 'xpath', git: 'git://github.com/teamcapybara/xpath.git'
gem 'webdrivers', git: 'git://github.com/hron/webdrivers', branch: 'iedriver-sorting-fix' if ENV['CI']
group :doc do
gem 'redcarpet', platforms: :mri

View File

@ -19,6 +19,9 @@ matrix:
install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- cinst Firefox GoogleChrome
# Registry hack so driver can maintain connection
- REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BFCACHE" /v iexplore.exe /t REG_DWORD /d 00000000
- REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BFCACHE" /v iexplore.exe /t REG_DWORD /d 00000000
- bundle config --local path vendor/bundle
- bundle install

View File

@ -7,7 +7,11 @@ require 'rspec/shared_spec_matchers'
Capybara.register_driver :selenium_ie do |app|
# ::Selenium::WebDriver.logger.level = "debug"
Capybara::Selenium::Driver.new(app, browser: :ie)
Capybara::Selenium::Driver.new(
app,
browser: :ie,
desired_capabilities: ::Selenium::WebDriver::Remote::Capabilities.ie('requireWindowFocus': true)
)
end
module TestSessions