Class: Watir::Locators::Element::Matcher
- Inherits:
-
Object
- Object
- Watir::Locators::Element::Matcher
- Includes:
- Exception, JSSnippets
- 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
Methods included from JSSnippets
Constructor Details
#initialize(query_scope, selector = {}) ⇒ Matcher
Returns a new instance of Matcher.
12 13 14 15 |
# File 'lib/watir/locators/element/matcher.rb', line 12 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.
10 11 12 |
# File 'lib/watir/locators/element/matcher.rb', line 10 def query_scope @query_scope end |
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
10 11 12 |
# File 'lib/watir/locators/element/matcher.rb', line 10 def selector @selector end |
Instance Method Details
#match(elements, values_to_match, filter) ⇒ Object
17 18 19 20 |
# File 'lib/watir/locators/element/matcher.rb', line 17 def match(elements, values_to_match, filter) elements = matching_labels(elements, values_to_match) matching_elements(elements, values_to_match, filter: filter) end |