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.4.0.rc2 lib/watir/locators/button/validator.rb
watir-6.4.0.rc1 lib/watir/locators/button/validator.rb
watir-6.3.0 lib/watir/locators/button/validator.rb
watir-6.2.1 lib/watir/locators/button/validator.rb
watir-6.2.0 lib/watir/locators/button/validator.rb
watir-6.1.0 lib/watir/locators/button/validator.rb
watir-6.0.3 lib/watir/locators/button/validator.rb
watir-6.0.2 lib/watir/locators/button/validator.rb
watir-6.0.1 lib/watir/locators/button/validator.rb
watir-6.0.0 lib/watir/locators/button/validator.rb
watir-6.0.0.beta5 lib/watir/locators/button/validator.rb
watir-6.0.0.beta4 lib/watir/locators/button/validator.rb
watir-6.0.0.beta3 lib/watir/locators/button/validator.rb
watir-6.0.0.beta2 lib/watir/locators/button/validator.rb
watir-6.0.0.beta1 lib/watir/locators/button/validator.rb