lib/watir/locators/button/locator.rb in watir-6.13.0 vs lib/watir/locators/button/locator.rb in watir-6.14.0
- old
+ new
@@ -1,11 +1,9 @@
module Watir
module Locators
class Button
class Locator < Element::Locator
-
-
private
def using_selenium(*)
# force watir usage
end
@@ -18,10 +16,11 @@
def matches_selector?(element, selector)
if selector.key?(:value)
copy = selector.dup
value = copy.delete(:value)
- super(element, copy) && (value === fetch_value(element, :value) || value === fetch_value(element, :text))
+ super(element, copy) &&
+ (fetch_value(element, :value) =~ /#{value}/ || fetch_value(element, :text) =~ /#{value}/)
else
super
end
end
end