class Browsery::PageObjects::Section
Attributes
parent[R]
root_element[R]
Public Class Methods
new(parent, root_element)
click to toggle source
# File lib/browsery/page_objects/section.rb, line 9 def initialize(parent, root_element) @parent = parent @root_element = root_element # Browsery.within(@root_element) { yield(self) } if block_given? end
Public Instance Methods
find_all(how, what)
click to toggle source
# File lib/browsery/page_objects/section.rb, line 27 def find_all(how, what) root_element.all(how, what) end
find_first(how, what)
click to toggle source
# File lib/browsery/page_objects/section.rb, line 23 def find_first(how, what) root_element.find_element(how, what) end
parent_page()
click to toggle source
# File lib/browsery/page_objects/section.rb, line 15 def parent_page candidate_page = parent until candidate_page.is_a?(Browsery::PageObjects::Base) candidate_page = candidate_page.parent end candidate_page end