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

EdgeChrome can't click on file inputs

This commit is contained in:
Thomas Walpole 2019-08-02 10:23:58 -07:00
parent 4c3bbc473d
commit 724e245b6e
2 changed files with 16 additions and 18 deletions

View file

@ -36,14 +36,16 @@ class Capybara::Selenium::EdgeNode < Capybara::Selenium::Node
html5_drop(*args) html5_drop(*args)
end end
# def click(*) def click(*)
# super super
# rescue ::Selenium::WebDriver::Error::WebDriverError => e rescue Selenium::WebDriver::Error::InvalidArgumentError => e
# # chromedriver 74 (at least on mac) raises the wrong error for this tag_name, type = attrs(:tagName, :type).map { |val| val&.downcase }
# raise ::Selenium::WebDriver::Error::ElementClickInterceptedError, e.message if e.message.match?(/element click intercepted/) if tag_name == 'input' && type == 'file'
# raise Selenium::WebDriver::Error::InvalidArgumentError, "EdgeChrome can't click on file inputs.\n#{e.message}"
# raise end
# end
raise
end
def disabled? def disabled?
return super unless chrome_edge? return super unless chrome_edge?

View file

@ -7,7 +7,7 @@ require 'shared_selenium_node'
require 'rspec/shared_spec_matchers' require 'rspec/shared_spec_matchers'
# unless ENV['CI'] # unless ENV['CI']
# Selenium::WebDriver::Edge::Service.driver_path = '/usr/local/bin/msedgedriver' # Selenium::WebDriver::Edge::Service.driver_path = '/usr/local/bin/msedgedriver'
# end # end
if ::Selenium::WebDriver::Platform.mac? if ::Selenium::WebDriver::Platform.mac?
@ -30,17 +30,13 @@ end
skipped_tests = %i[response_headers status_code trigger] skipped_tests = %i[response_headers status_code trigger]
Capybara::SpecHelper.log_selenium_driver_version(Selenium::WebDriver::Edge) if ENV['CI'] Capybara::SpecHelper.log_selenium_driver_version(Selenium::WebDriver::EdgeChrome) if ENV['CI']
Capybara::SpecHelper.run_specs TestSessions::SeleniumEdge, 'selenium', capybara_skip: skipped_tests do |example| Capybara::SpecHelper.run_specs TestSessions::SeleniumEdge, 'selenium', capybara_skip: skipped_tests do |example|
# case example.metadata[:description] case example.metadata[:full_description]
# when /#refresh it reposts$/ when 'Capybara::Session selenium #attach_file with a block can upload by clicking the file input'
# skip 'Edge insists on prompting without providing a way to suppress' pending "EdgeChrome doesn't allow clicking on file inputs"
# when /should be able to open non-http url/ end
# skip 'Crashes'
# when /when Capybara.always_include_port is true/
# skip 'Crashes'
# end
end end
RSpec.describe 'Capybara::Session with Edge', capybara_skip: skipped_tests do RSpec.describe 'Capybara::Session with Edge', capybara_skip: skipped_tests do