P - The Page that extends this.public abstract class Page<P extends Page> extends Object implements PageAssertions<P>
URL.WebDriver associated with this page is currently viewing
about:blank (normal when a WebDriver is first instantiated), then it loads
the desired URL.assertPageIsViewableFrom(java.net.URL) to verify that the
desired URL represents this Page.handlePageLoaded() to optionally do something once the
Page has been initialized.| Modifier and Type | Field and Description |
|---|---|
protected MethodContext |
context |
protected String |
endpoint |
protected URL |
url |
protected org.openqa.selenium.WebDriver |
webDriver |
| Constructor and Description |
|---|
Page() |
| Modifier and Type | Method and Description |
|---|---|
P |
assertCurrentUrlPathStartsWith(String proposal)
Asserts that the WebDriver's current URL path starts with the proposal.
|
protected abstract boolean |
assertPageIsViewableFrom(URL proposedUrl)
Asserts that this page can be viewed from the proposedUrl.
|
protected void |
handlePageLoaded()
Called when this page is loaded in the WebDriver and initialized.
|
protected MethodContext context
protected String endpoint
protected URL url
protected org.openqa.selenium.WebDriver webDriver
public P assertCurrentUrlPathStartsWith(String proposal)
PageAssertionsassertCurrentUrlPathStartsWith in interface PageAssertions<P extends Page>proposal - proposalprotected abstract boolean assertPageIsViewableFrom(URL proposedUrl)
proposedUrl - A proposed URL.IllegalStateException - If this page can't be viewed from the
proposed URL.protected void handlePageLoaded()
Copyright © 2015. All rights reserved.