class Page extends DocumentElement implements ISearchContext (View source)

The base class to be used for making classes representing pages, that can contain WebElements.

Properties

protected IPageFactory $pageFactory Page factory, used to create a Page.
protected IBuilder $urlBuilder The builder which generates the url.

Methods

__construct(IPageFactory $page_factory)

Initialize the page.

string
getAbsoluteUrl(array $params = array())

Returns full url to the page with a possibility to alter it real time.

open(array $params = array())

Opens this page in browser.

setUrlBuilder(IBuilder $url_builder)

Sets the url builder.

boolean
opened()

Checks if the page is currently opened in browser.

Expectation
shouldReceive(string $name)

No description

Details

__construct(IPageFactory $page_factory)

Initialize the page.

Parameters

IPageFactory $page_factory Page factory.

string getAbsoluteUrl(array $params = array())

Returns full url to the page with a possibility to alter it real time.

Parameters

array $params Page parameters.

Return Value

string

Exceptions

PageException When url builder is missing.

Page open(array $params = array())

Opens this page in browser.

Parameters

array $params Page parameters.

Return Value

Page

Exceptions

PageException When page url not specified.

Page setUrlBuilder(IBuilder $url_builder)

Sets the url builder.

Parameters

IBuilder $url_builder Url builder.

Return Value

Page

boolean opened()

Checks if the page is currently opened in browser.

Return Value

boolean

Expectation shouldReceive(string $name)

Parameters

string $name

Return Value

Expectation