Method: PageObject#initialize
- Defined in:
- lib/page-object.rb
#initialize(root, visit = false) ⇒ Object
Construct a new page object. Prior to browser initialization it will call a method named initialize_accessors if it exists. Upon initialization of the page it will call a method named initialize_page if it exists.
73 74 75 76 77 78 |
# File 'lib/page-object.rb', line 73 def initialize(root, visit=false) initialize_accessors if respond_to?(:initialize_accessors) initialize_browser(root) goto if visit && self.class.instance_methods(false).include?(:goto) initialize_page if respond_to?(:initialize_page) end |