Sha256: 15f78d560fd2d3a09e06d1ffe2668adebe1d29f990969381e272e529751ad8fd

Contents?: true

Size: 512 Bytes

Versions: 35

Compression:

Stored size: 512 Bytes

Contents

module Watir
  module Locators
    class Button
      class Validator < Element::Validator
        def validate(element, selector)
          return unless %w[input button].include?(element.tag_name.downcase)
          # TODO - Verify this is desired behavior based on https://bugzilla.mozilla.org/show_bug.cgi?id=1290963
          return if element.tag_name.downcase == "input" && !Watir::Button::VALID_TYPES.include?(element.attribute(:type).downcase)

          element
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
watir-6.9.1 lib/watir/locators/button/validator.rb
watir-6.9.0 lib/watir/locators/button/validator.rb
watir-6.8.4 lib/watir/locators/button/validator.rb
watir-6.8.3 lib/watir/locators/button/validator.rb
watir-6.8.2 lib/watir/locators/button/validator.rb
watir-6.8.1 lib/watir/locators/button/validator.rb
watir-6.8.0 lib/watir/locators/button/validator.rb
watir-6.7.3 lib/watir/locators/button/validator.rb
watir-6.7.2 lib/watir/locators/button/validator.rb
watir-6.7.1 lib/watir/locators/button/validator.rb
watir-6.7.0 lib/watir/locators/button/validator.rb
watir-6.6.3 lib/watir/locators/button/validator.rb
watir-6.6.2 lib/watir/locators/button/validator.rb
watir-6.6.1 lib/watir/locators/button/validator.rb
watir-6.6.0 lib/watir/locators/button/validator.rb
watir-6.5.0 lib/watir/locators/button/validator.rb
watir-6.4.3 lib/watir/locators/button/validator.rb
watir-6.4.2 lib/watir/locators/button/validator.rb
watir-6.4.1 lib/watir/locators/button/validator.rb
watir-6.4.0 lib/watir/locators/button/validator.rb