Module: Watigiri::Locators::MatcherHelpers
- Included in:
- Button::Matcher, Element::Matcher, TextField::Matcher
- Defined in:
- lib/watigiri/locators/element/matcher.rb
Instance Attribute Summary collapse
-
#nokogiri ⇒ Object
Returns the value of attribute nokogiri.
Instance Method Summary collapse
- #deprecate_text_regexp ⇒ Object
- #fetch_value(element, how) ⇒ Object
- #matching_labels(elements) ⇒ Object
Instance Attribute Details
#nokogiri ⇒ Object
Returns the value of attribute nokogiri.
4 5 6 |
# File 'lib/watigiri/locators/element/matcher.rb', line 4 def nokogiri @nokogiri end |
Instance Method Details
#deprecate_text_regexp ⇒ Object
25 26 27 |
# File 'lib/watigiri/locators/element/matcher.rb', line 25 def deprecate_text_regexp(*) # not applicable to Watigiri end |
#fetch_value(element, how) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/watigiri/locators/element/matcher.rb', line 10 def fetch_value(element, how) return super unless nokogiri case how when :text element.inner_text when :href element.attribute('href')&.to_s&.strip when :tag_name element.name.downcase else super.to_s end end |
#matching_labels(elements) ⇒ Object
6 7 8 |
# File 'lib/watigiri/locators/element/matcher.rb', line 6 def matching_labels(elements, *) nokogiri ? elements : super end |