Class: Watir::Locators::Element::Matcher
- Inherits:
-
Object
- Object
- Watir::Locators::Element::Matcher
- Includes:
- Exception
- Defined in:
- lib/watir/locators/element/matcher.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#query_scope ⇒ Object
readonly
Returns the value of attribute query_scope.
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Instance Method Summary collapse
-
#initialize(query_scope, selector = {}) ⇒ Matcher
constructor
A new instance of Matcher.
- #match(elements, values_to_match, filter) ⇒ Object
Constructor Details
#initialize(query_scope, selector = {}) ⇒ Matcher
Returns a new instance of Matcher.
9 10 11 12 |
# File 'lib/watir/locators/element/matcher.rb', line 9 def initialize(query_scope, selector = {}) @query_scope = query_scope @selector = selector end |
Instance Attribute Details
#query_scope ⇒ Object (readonly)
Returns the value of attribute query_scope
7 8 9 |
# File 'lib/watir/locators/element/matcher.rb', line 7 def query_scope @query_scope end |
#selector ⇒ Object (readonly)
Returns the value of attribute selector
7 8 9 |
# File 'lib/watir/locators/element/matcher.rb', line 7 def selector @selector end |
Instance Method Details
#match(elements, values_to_match, filter) ⇒ Object
14 15 16 17 |
# File 'lib/watir/locators/element/matcher.rb', line 14 def match(elements, values_to_match, filter) elements = matching_labels(elements, values_to_match) matching_elements(elements, values_to_match, filter: filter) end |