public class Page<T extends Page<T>>
extends net.thucydides.core.pages.PageObject
| Modifier and Type | Field and Description |
|---|---|
Assertion<T> |
assertion
A reference to
Assertion to be used for calling chained assertions. |
Logger<T> |
logger
A reference to
Logger to be used for calling chained logging statements. |
| Constructor and Description |
|---|
Page() |
| Modifier and Type | Method and Description |
|---|---|
static Page |
get() |
static <T extends Page> |
get(Class<T> type)
Gets a class instance without any additional actions
|
static String |
getCurrentUrl() |
static void |
initialize(org.openqa.selenium.WebDriver webDriver)
Initialization step is required before any
Page can be obtained statically. |
T |
navigateTo()
Represents a set of actions required to navigate to a given page, that can be called from
standalone context.
|
static <T extends Page> |
navigateToPage(Class<T> type)
Executes overridden
navigateTo() method and returns a reference to it's instance |
static <T extends Page> |
waitForPage(Class<T> type)
Executes overridden
waitToLoad() method and returns a reference to it's instance |
T |
waitToLoad()
Represents a set of conditions that are required for the page to be considered loaded.
|
$, $, addJQuerySupport, blurActiveElement, callWhenPageOpensMethods, clickOn, compatibleWithUrl, containsAllText, containsText, containsTextInElement, element, element, element, enter, evaluateJavascript, evaluateJavascript, find, findAll, findAll, findBy, fluent, getAlert, getClock, getDriver, getJavascriptExecutorFacade, getRenderedView, getSelectedLabelFrom, getSelectedOptionLabelsFrom, getSelectedOptionValuesFrom, getSelectedValueFrom, getTitle, hasFocus, isElementVisible, isXPath, matchesAnyUrl, open, open, open, openAt, openUnchecked, openUnchecked, openUnchecked, selectFromDropdown, selectMultipleItemsFromDropdown, setCheckbox, setDefaultBaseUrl, setDriver, setDriver, setPages, setPageUrls, setWaitForTimeout, shouldBeDisplayed, shouldBeVisible, shouldBeVisible, shouldContainAllText, shouldContainText, shouldContainTextInElement, shouldNotBeVisible, shouldNotBeVisible, shouldNotContainTextInElement, switchToPage, thenReturnElementList, typeInto, updateUrlWithBaseUrlIfDefined, upload, waitABit, waitFor, waitFor, waitFor, waitForAbsenceOf, waitForAllTextToAppear, waitForAnyRenderedElementOf, waitForAnyTextToAppear, waitForAnyTextToAppear, waitForCondition, waitForPresenceOf, waitForRenderedElements, waitForRenderedElementsToBePresent, waitForRenderedElementsToDisappear, waitForTextToAppear, waitForTextToAppear, waitForTextToAppear, waitForTextToDisappear, waitForTextToDisappear, waitForTextToDisappear, waitForTimeout, waitForTimeoutInMilliseconds, waitForTitleToAppear, waitForTitleToDisappear, waitForWithRefresh, withAction, withParameterspublic final Assertion<T extends Page<T>> assertion
Assertion to be used for calling chained assertions. Any method called
using this reference will return back a reference to 'this'.public static void initialize(org.openqa.selenium.WebDriver webDriver)
Page can be obtained statically. It is also needed
when the WebDriver instance used by tests is changed.webDriver - WebDriver instance that all inherited PageObjects will usepublic static <T extends Page> T waitForPage(Class<T> type)
waitToLoad() method and returns a reference to it's instancetype - name of class extending Page to wait fortype parameterpublic static <T extends Page> T navigateToPage(Class<T> type)
navigateTo() method and returns a reference to it's instancetype - name of class extending Page to navigate totype parameterpublic static <T extends Page> T get(Class<T> type)
type - name of class extending Page to obtaintype parameterpublic T navigateTo()
public T waitToLoad()
public static String getCurrentUrl()
WebDriverCopyright © 2015. All rights reserved.