Class: Watir::Locators::Option::Matcher
- Inherits:
-
Element::Matcher
- Object
- Element::Matcher
- Watir::Locators::Option::Matcher
- Defined in:
- lib/watir/locators/option/matcher.rb
Instance Method Summary collapse
Instance Method Details
#fetch_value(element, how) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/watir/locators/option/matcher.rb', line 7 def fetch_value(element, how) case how when :any [element.attribute(:value), execute_js(:getTextContent, element).gsub(/\s+/, ' ').strip, element.attribute(:label)] else super end end |
#matches_values?(found, expected) ⇒ Boolean
18 19 20 21 22 |
# File 'lib/watir/locators/option/matcher.rb', line 18 def matches_values?(found, expected) return super unless found.is_a?(Array) found.find { |possible| matches_values?(possible, expected) } end |