public abstract class WebPage extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BIG_TIMEOUT |
protected Configuration |
config |
static int |
DEFAULT_TIMEOUT
Can be used by tests as default timeouts.
|
protected org.openqa.selenium.WebDriver |
driver |
protected FeaturesRunner |
runner |
Constructor and Description |
---|
WebPage() |
Modifier and Type | Method and Description |
---|---|
WebPage |
ensureLoaded()
Should be overridden by dynamic page (using ajax) to wait until the page
is completely loaded By default nothing is done (page is assumed to be
loaded)
|
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by,
int timeOutInSeconds) |
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
static void |
flushPageCache() |
Attachment |
getAttachment()
Gives access to an attachment retrieved from this web page.
|
Configuration |
getConfiguration() |
org.openqa.selenium.WebDriver |
getDriver() |
<T extends WebPage> |
getPage(Class<T> type) |
static <T extends WebPage> |
getPage(FeaturesRunner runner,
Configuration config,
Class<T> type) |
FeaturesRunner |
getRunner() |
boolean |
hasElement(org.openqa.selenium.By by) |
boolean |
hasElement(org.openqa.selenium.By by,
int timeoutInSeconds) |
void |
home() |
void |
to(String path) |
org.openqa.selenium.WebElement |
waitUntilElementFound(org.openqa.selenium.By by,
int timeOutInSeconds) |
void |
waitUntilElementNotFound(org.openqa.selenium.By by,
int timeOutInSeconds) |
public static int DEFAULT_TIMEOUT
public static int BIG_TIMEOUT
@Inject protected Configuration config
@Inject protected org.openqa.selenium.WebDriver driver
@Inject protected FeaturesRunner runner
public WebPage()
public WebPage ensureLoaded()
public Configuration getConfiguration()
public org.openqa.selenium.WebDriver getDriver()
public FeaturesRunner getRunner()
public void home()
public boolean hasElement(org.openqa.selenium.By by)
public boolean hasElement(org.openqa.selenium.By by, int timeoutInSeconds)
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by, int timeOutInSeconds)
public org.openqa.selenium.WebElement waitUntilElementFound(org.openqa.selenium.By by, int timeOutInSeconds)
public void waitUntilElementNotFound(org.openqa.selenium.By by, int timeOutInSeconds)
public static <T extends WebPage> T getPage(FeaturesRunner runner, Configuration config, Class<T> type)
public Attachment getAttachment()
public static void flushPageCache()
Copyright © 2016 Nuxeo SA. All rights reserved.