lib/watir/locators/text_field/validator.rb in watir-6.14.0 vs lib/watir/locators/text_field/validator.rb in watir-6.15.0

- old
+ new

@@ -1,12 +1,12 @@ module Watir module Locators class TextField class Validator < Element::Validator - def validate(element, _selector) - return unless element.tag_name.casecmp('input').zero? - - element + def validate(element, _tag_name) + # Zero for Ruby 2.3, Ruby 2.4+ this evaluates true/false + result = element.tag_name.casecmp('input') + result.zero? || result.eq(true) end end end end end