Class: Locator::Element::FormElement
- Inherits:
-
Locator::Element
- Object
- Locator::Element
- Locator::Element::FormElement
- Defined in:
- lib/locator/element/form_element.rb
Instance Attribute Summary
Attributes inherited from Locator::Element
#attributes, #css, #locatables, #name
Instance Method Summary collapse
-
#initialize(name, attributes = {}) ⇒ FormElement
constructor
A new instance of FormElement.
- #lookup(dom, selector, attributes) ⇒ Object
Methods inherited from Locator::Element
Constructor Details
#initialize(name, attributes = {}) ⇒ FormElement
Returns a new instance of FormElement.
4 5 6 7 8 |
# File 'lib/locator/element/form_element.rb', line 4 def initialize(name, attributes = {}) attributes[:matches] ||= [] attributes[:matches] << :name super end |
Instance Method Details
#lookup(dom, selector, attributes) ⇒ Object
10 11 12 |
# File 'lib/locator/element/form_element.rb', line 10 def lookup(dom, selector, attributes) super(dom, selector, attributes) + LabeledElement.new(name).send(:lookup, dom, selector, attributes.dup) end |