class Watir::Locators::Button::Locator
Public Instance Methods
locate_all()
click to toggle source
# File lib/watir-webdriver/locators/button/locator.rb, line 5 def locate_all find_all_by_multiple end
Private Instance Methods
can_convert_regexp_to_contains?()
click to toggle source
# File lib/watir-webdriver/locators/button/locator.rb, line 20 def can_convert_regexp_to_contains? # regexp conversion won't work with the complex xpath selector false end
matches_selector?(element, selector)
click to toggle source
Calls superclass method
# File lib/watir-webdriver/locators/button/locator.rb, line 25 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)) else super end end
wd_find_first_by(how, what)
click to toggle source
Calls superclass method
# File lib/watir-webdriver/locators/button/locator.rb, line 11 def wd_find_first_by(how, what) if how == :tag_name how = :xpath what = ".//button | .//input[#{selector_builder.xpath_builder.attribute_expression(:input, type: Watir::Button::VALID_TYPES)}]" end super end