Sha256: 2922460aea8dc8dd64bc342ea744343ada6a9c28ee0d9c686b17dcd9fe6ed42a

Contents?: true

Size: 492 Bytes

Versions: 7

Compression:

Stored size: 492 Bytes

Contents

module Capybara
  module Node
    class Element < Base
      include Capybara::Accessible::Auditor

      def click
        synchronize { base.click }
        begin
          if Capybara.current_driver == :accessible && audit_failures.any?
            raise Capybara::Accessible::InaccessibleError, failure_messages
          end
        rescue ::Selenium::WebDriver::Error::UnhandledAlertError => e
          puts "Skipping accessibility audit: #{e}"
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
capybara-accessible-0.1.8 lib/capybara/accessible/element.rb
capybara-accessible-0.1.7 lib/capybara/accessible/element.rb
capybara-accessible-0.1.6 lib/capybara/accessible/element.rb
capybara-accessible-0.1.5 lib/capybara/accessible/element.rb
capybara-accessible-0.1.4 lib/capybara/accessible/element.rb
capybara-accessible-0.1.1 lib/capybara/accessible/element.rb
capybara-accessible-0.1.0 lib/capybara/accessible/element.rb