Sha256: bcdedf58363c99377f2d30a10fdce37c78c92275433671fac6535f04fc4fc97a

Contents?: true

Size: 535 Bytes

Versions: 7

Compression:

Stored size: 535 Bytes

Contents

module Watir
  module Locators
    class Button
      class Matcher < Element::Matcher
        def validate_tag(element, _expected)
          tag_name = fetch_value(element, :tag_name)
          return unless %w[input button].include?(tag_name)

          # TODO: - Verify this is desired behavior based on https://bugzilla.mozilla.org/show_bug.cgi?id=1290963
          return if tag_name == 'input' && !Watir::Button::VALID_TYPES.include?(element.attribute('type').downcase)

          element
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
watir-7.1.0 lib/watir/locators/button/matcher.rb
watir-7.0.0 lib/watir/locators/button/matcher.rb
watir-7.0.0.beta5 lib/watir/locators/button/matcher.rb
watir-7.0.0.beta4 lib/watir/locators/button/matcher.rb
watir-7.0.0.beta3 lib/watir/locators/button/matcher.rb
watir-7.0.0.beta2 lib/watir/locators/button/matcher.rb
watir-7.0.0.beta1 lib/watir/locators/button/matcher.rb