Class: Watir::Locators::Button::Validator
- Inherits:
-
Element::Validator
- Object
- Element::Validator
- Watir::Locators::Button::Validator
- Defined in:
- lib/watir-webdriver/locators/button/validator.rb
Instance Method Summary collapse
Instance Method Details
#validate(element, selector) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/watir-webdriver/locators/button/validator.rb', line 5 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 |