Method: PageObject::Accessors#page_url

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

#page_url(url) ⇒ Object Also known as: direct_url

Specify the url for the page. A call to this method will generate a ‘goto’ method to take you to the page.

Parameters:

  • the (String)

    url for the page.

  • a (Symbol)

    method name to call to get the url



19
20
21
22
23
24
# File 'lib/page-object/accessors.rb', line 19

def page_url(url)
  define_method("goto") do
    url = url.kind_of?(Symbol) ? self.send(url) : url
    platform.navigate_to url
  end
end