Class: AutomationObject::State::ElementArray
- Includes:
- CommonElement
- Defined in:
- lib/automation_object/state/element_array.rb
Overview
Element array composite for managing state
Instance Attribute Summary
Attributes included from CommonElement
Attributes inherited from Base
Attributes inherited from Composite
#children, #location, #name, #parent
Instance Method Summary collapse
-
#utilize ⇒ Array<AutomationObject::State::ElementProxy>
Selenium proxy.
Methods included from CommonElement
#active?, #method_hook?, #method_hooks, #method_to_container, #reset
Methods inherited from Base
#get_child, #get_children, #initialize, #screen, #top
Methods inherited from Composite
#add_has_many_relationships, #add_has_one_relationships, #get_child, #get_children, has_many, has_many_relationships, has_one, has_one_relationships, #initialize, #top
Methods included from Reflection
Methods included from CompositeHook
#after_create_run, #before_create_run, included
Constructor Details
This class inherits a constructor from AutomationObject::State::Base
Instance Method Details
#utilize ⇒ Array<AutomationObject::State::ElementProxy>
Returns Selenium proxy
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/automation_object/state/element_array.rb', line 15 def utilize return cache if cache elements = driver.find_elements(*blue_prints.selector_params) @active = true self.cache = elements.map do |element| ElementProxy.new(self, element) end end |