class EDSL::PageObject::Section
This class represents a section of the dom contained within a root element.
Using this base class is not a requirement, however code in some modules may assume that methods in this class are available when they're dealing with sections
This allows your object to serve as a proxy for the element and mirror it's API.
Public Class Methods
new(element, parent)
click to toggle source
Create a new section
Calls superclass method
# File lib/edsl/page_object/section.rb, line 15 def initialize(element, parent) super(element, parent) end
Public Instance Methods
_find_browser_via(container)
click to toggle source
# File lib/edsl/page_object/section.rb, line 23 def _find_browser_via(container) raise ScriptError, "Could not locate a browser in #{self.class}." if container.nil? return container.browser if container.respond_to?(:browser) _find_browser_via(container.parent_container) end
browser()
click to toggle source
# File lib/edsl/page_object/section.rb, line 19 def browser @browser ||= _find_browser_via(parent_container) end