Sha256: 460c7c73f3bae7c57d4d7e00e538d27de20f154ffaab6b86f119a8a588104f6e

Contents?: true

Size: 390 Bytes

Versions: 3

Compression:

Stored size: 390 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)
          return if element.tag_name.downcase == "input" && !Watir::Button::VALID_TYPES.include?(element.attribute(:type))

          element
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
watir-webdriver-0.9.9 lib/watir-webdriver/locators/button/validator.rb
watir-webdriver-0.9.3 lib/watir-webdriver/locators/button/validator.rb
watir-webdriver-0.9.2 lib/watir-webdriver/locators/button/validator.rb