While instantiating a Page the PageHolder will be stored here.
This allowes a cleaner syntax for PageObjects without passing the PageHolder around.
Because of this it is only allowed to create PageObjects for arguments passed to
PageBrowser.to(page), PageBrowser.via(page), PageBrowser.at(page),
PageBrowser.isAt(page) or UnexpectedPages
This allows the PageObject to be completely stateless, only the PageHolder owns a state (the active Page).
Because a PageObject needs a reference to the PageHolder to ask for the WebDriver, and this should not be mutable,
this information needs to be passed at creation time. Because we do not want to write boilerplate code for
PageObjects, this PageHolder object is used.
While instantiating a Page the PageHolder will be stored here.
This allowes a cleaner syntax for PageObjects without passing the PageHolder around.
Because of this it is only allowed to create PageObjects for arguments passed to
PageBrowser.to(page)
,PageBrowser.via(page)
,PageBrowser.at(page)
,PageBrowser.isAt(page)
orUnexpectedPages
This allows the PageObject to be completely stateless, only the PageHolder owns a state (the active Page). Because a PageObject needs a reference to the PageHolder to ask for the WebDriver, and this should not be mutable, this information needs to be passed at creation time. Because we do not want to write boilerplate code for PageObjects, this PageHolder object is used.