Class: EDSL::ElementContainer
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- EDSL::ElementContainer
- Includes:
- EDSL
- Defined in:
- lib/edsl/element_container.rb
Overview
This serves as a handy base class for custom elements, page objects and page sections as this inherits from SimpleDelegator any call that would be valid on the root element or browser is valid on the container object.
Using this base class is not a requirement, however code in some modules may assume that methods in this class are available.
This allows your object to serve as a proxy for the Watir::Container and be have an API consistent with other elements
Constant Summary
Constants included from EDSL
Instance Attribute Summary collapse
-
#parent_container ⇒ Object
readonly
Returns the value of attribute parent_container.
Instance Method Summary collapse
-
#initialize(element, parent = nil) ⇒ ElementContainer
constructor
A new instance of ElementContainer.
Methods included from EDSL
add_resolvers, alias_accessor, define_accessor, define_accessors, extend_dsl, included
Constructor Details
#initialize(element, parent = nil) ⇒ ElementContainer
Returns a new instance of ElementContainer.
19 20 21 22 |
# File 'lib/edsl/element_container.rb', line 19 def initialize(element, parent = nil) super(element) @parent_container = parent end |
Instance Attribute Details
#parent_container ⇒ Object (readonly)
Returns the value of attribute parent_container.
16 17 18 |
# File 'lib/edsl/element_container.rb', line 16 def parent_container @parent_container end |