1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Add specific gemfile for appveyor ie testing

This commit is contained in:
Thomas Walpole 2018-04-05 09:18:55 -07:00
parent ca15f5e016
commit a1b7e454be
9 changed files with 16 additions and 10 deletions

View file

@ -4,7 +4,6 @@ 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

@ -9,6 +9,7 @@ environment:
CAPYBARA_FF: true
- RUBY_VERSION: 25
CAPYBARA_IE: true
BUNDLE_GEMFILE: gemfiles/Gemfile.ie
- RUBY_VERSION: 22
matrix:

View file

@ -1,7 +1,7 @@
source "https://rubygems.org"
gem 'bundler', '~> 1.1'
gemspec :path => '..'
gemspec path: '..'
gem 'pkg-config' # needed by nokogiri
gem 'xpath', github: 'teamcapybara/xpath'

View file

@ -1,7 +1,7 @@
source "https://rubygems.org"
gem 'bundler', '~> 1.1'
gemspec :path => '..'
gemspec path: '..'
gem 'xpath', github: 'teamcapybara/xpath'

6
gemfiles/Gemfile.ie Normal file
View file

@ -0,0 +1,6 @@
source 'https://rubygems.org'
gem 'bundler', '~> 1.1'
gemspec path: '..'
gem 'webdrivers', git: 'git://github.com/hron/webdrivers', branch: 'iedriver-sorting-fix' if ENV['CI']

View file

@ -1,7 +1,7 @@
source 'https://rubygems.org'
gem 'bundler', '~> 1.1'
gemspec :path => '..'
gemspec path: '..'
gem 'xpath', github: 'teamcapybara/xpath'
gem 'rspec', '~>3.4.0'

View file

@ -266,7 +266,7 @@ module Capybara
el ||= find(selector, locator, options.merge(visible: :all))
res = find(:label, for: el, visible: true).click unless el.checked? == checked
res
rescue => e2 # swallow extra errors - raise original
rescue # swallow extra errors - raise original
raise e
end
end

View file

@ -272,8 +272,8 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
::Selenium::WebDriver::Error::InvalidElementStateError,
::Selenium::WebDriver::Error::ElementNotSelectableError,
::Selenium::WebDriver::Error::ElementNotSelectableError,
::Selenium::WebDriver::Error::NoSuchElementError, # IE
::Selenium::WebDriver::Error::InvalidArgumentError #IE
::Selenium::WebDriver::Error::NoSuchElementError, # IE
::Selenium::WebDriver::Error::InvalidArgumentError # IE
]
end

View file

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