Method: PageObject::PageFactory#visit_page

Defined in:
lib/page-object/page_factory.rb

#visit_page(page_class, &block) ⇒ PageObject Also known as: visit

Create and navigate to a page object. The navigation will only work if the ‘page_url’ method was call on the page object.

Parameters:

  • a (PageObject)

    class that has included the PageObject module

  • an

    optional block to be called

Returns:



42
43
44
# File 'lib/page-object/page_factory.rb', line 42

def visit_page(page_class, &block)
  on_page page_class, true, &block
end