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

Update appveyor and disable requireWindowFocus for IE - it causes too many failures for what it fixes

This commit is contained in:
Thomas Walpole 2019-04-26 11:42:32 -07:00
parent b623bf1a99
commit 9931c2bd5d
3 changed files with 15 additions and 11 deletions

View file

@ -7,12 +7,12 @@ cache:
environment:
matrix:
- RUBY_VERSION: 25
- RUBY_VERSION: 26
CAPYBARA_FF: true
- RUBY_VERSION: 25
CAPYBARA_IE: true
BUNDLE_GEMFILE: gemfiles/Gemfile.ie
- RUBY_VERSION: 23
- RUBY_VERSION: 24
matrix:
allow_failures:

View file

@ -4,6 +4,8 @@ require 'capybara/selenium/extensions/html5_drag'
class Capybara::Selenium::IENode < Capybara::Selenium::Node
def disabled?
driver.evaluate_script("arguments[0].msMatchesSelector(':disabled, select:disabled *')", self)
# TODO: Doesn't work for a bunch of cases - need to get IE running to see if it can be done like this
# driver.evaluate_script("arguments[0].msMatchesSelector(':disabled, select:disabled *')", self)
super
end
end

View file

@ -5,13 +5,13 @@ require 'selenium-webdriver'
require 'shared_selenium_session'
require 'rspec/shared_spec_matchers'
# if ENV['CI']
# if ::Selenium::WebDriver::Service.respond_to? :driver_path=
# ::Selenium::WebDriver::IE::Service
# else
# ::Selenium::WebDriver::IE
# end.driver_path = 'C:\Tools\WebDriver\IEDriverServer.exe'
# end
if ENV['CI']
if ::Selenium::WebDriver::Service.respond_to? :driver_path=
::Selenium::WebDriver::IE::Service
else
::Selenium::WebDriver::IE
end.driver_path = 'C:\Tools\WebDriver\IEDriverServer.exe'
end
def selenium_host
ENV.fetch('SELENIUM_HOST', '192.168.56.102')
@ -28,7 +28,7 @@ end
Capybara.register_driver :selenium_ie do |app|
# ::Selenium::WebDriver.logger.level = "debug"
options = ::Selenium::WebDriver::IE::Options.new
options.require_window_focus = true
# options.require_window_focus = true
# options.add_option("log", {"level": "trace"})
if ENV['REMOTE']
@ -110,6 +110,8 @@ Capybara::SpecHelper.run_specs TestSessions::SeleniumIE, 'selenium', capybara_sk
# pending "IE driver doesn't error when clicking on covered elements, it just clicks the wrong element"
when /#click should go to the same page if href is blank$/
pending 'IE treats blank href as a parent request (against HTML spec)'
when /#attach_file with a block/
skip 'Hangs IE testing for unknown reason'
end
end