public interface TestPage<D>
The root interface in the test page hierarchy. A test page represents a web-page of your a web/mobile-web application or a view of mobile-native application. TestPage increases re-usability by reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.
Modifier and Type | Interface and Description |
---|---|
static class |
TestPage.LaunchStrategy |
Modifier and Type | Method and Description |
---|---|
PageLocator |
getPageLocator() |
TestPage<D> |
getParent() |
UiTestBase<D> |
getTestBase()
selenium base instance to provide selenium
|
java.lang.String |
getText()
Returns the body text of the current page
|
boolean |
isPageActive(PageLocator loc,
java.lang.Object... args)
This method check for existence of page in browser so we can proceed
further with page functionality.
|
void |
launchPage(PageLocator locator,
java.lang.Object... args)
Use only launchPage method to load a page.
|
void |
setLaunchStrategy(TestPage.LaunchStrategy strategy)
You can specify launch behavior before launching the page by calling this
method.
|
PageLocator getPageLocator()
boolean isPageActive(PageLocator loc, java.lang.Object... args)
args
- optional arguments required to identify page.UiTestBase<D> getTestBase()
java.lang.String getText()
void launchPage(PageLocator locator, java.lang.Object... args)
void launchPage(){
launchPage(null)
}
OR
void launchPage(String locator){
launchPage(new DefaultPageLocator(locator));
}
locator
- to locate page on parent page.
This locator will be passed to other fw methods for example
isPageActive(PageLocator, Object...)
args
- optional page identifiers to verify is this page for what we
aspect? for example: view details page for specific user or
item, you can identify page by user or item id/name
This args will be passed to other fw methods for example
isPageActive(PageLocator, Object...)
void setLaunchStrategy(TestPage.LaunchStrategy strategy)
strategy
- launch strategy.Copyright © 2000 Infostretch Corp.