public abstract class AbstractTest extends Object
Constructor and Description |
---|
AbstractTest() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
asPage(Class<T> pageClassToProxy) |
static org.openqa.selenium.WebElement |
findElementWithTimeout(org.openqa.selenium.By by)
Finds the first
WebElement using the given method, with a
timeout. |
static org.openqa.selenium.WebElement |
findElementWithTimeout(org.openqa.selenium.By by,
int timeout)
Finds the first
WebElement using the given method, with a
timeout. |
static org.openqa.selenium.WebElement |
findElementWithTimeout(org.openqa.selenium.By by,
int timeout,
org.openqa.selenium.WebElement parentElement)
Finds the first
WebElement using the given method, with a
timeout. |
static org.openqa.selenium.WebElement |
findElementWithTimeout(org.openqa.selenium.By by,
org.openqa.selenium.WebElement parentElement)
Finds the first
WebElement using the given method, with a
timeout. |
static <T> T |
get(String url,
Class<T> pageClassToProxy) |
LoginPage |
getLoginPage() |
static void |
initDriver() |
DocumentBasePage |
login()
Login as Administrator
|
DocumentBasePage |
login(String username,
String password) |
LoginPage |
loginInvalid(String username,
String password)
Login using an invalid credential.
|
<T extends AbstractPage> |
nav(Class<T> pageClass,
String linkText)
navigate to a link text.
|
static void |
quitDriver() |
static void |
waitUntilEnabled(org.openqa.selenium.WebElement element)
Waits until an element is enabled, with a timeout.
|
static void |
waitUntilEnabled(org.openqa.selenium.WebElement element,
int timeout)
Waits until an element is enabled, with a timeout.
|
public static final String NUXEO_URL
public static void quitDriver() throws InterruptedException
InterruptedException
public static <T> T asPage(Class<T> pageClassToProxy)
public static org.openqa.selenium.WebElement findElementWithTimeout(org.openqa.selenium.By by, int timeout) throws org.openqa.selenium.NoSuchElementException
WebElement
using the given method, with a
timeout.by
- the locating mechanismtimeout
- the timeout in millisecondsorg.openqa.selenium.NoSuchElementException
- when not foundpublic static org.openqa.selenium.WebElement findElementWithTimeout(org.openqa.selenium.By by, int timeout, org.openqa.selenium.WebElement parentElement) throws org.openqa.selenium.NoSuchElementException
WebElement
using the given method, with a
timeout.by
- the locating mechanismtimeout
- the timeout in millisecondsparentElement
- find from the elementorg.openqa.selenium.NoSuchElementException
- when not foundpublic static org.openqa.selenium.WebElement findElementWithTimeout(org.openqa.selenium.By by) throws org.openqa.selenium.NoSuchElementException
WebElement
using the given method, with a
timeout.by
- the locating mechanismtimeout
- the timeout in millisecondsorg.openqa.selenium.NoSuchElementException
- when not foundpublic static org.openqa.selenium.WebElement findElementWithTimeout(org.openqa.selenium.By by, org.openqa.selenium.WebElement parentElement) throws org.openqa.selenium.NoSuchElementException
WebElement
using the given method, with a
timeout.by
- the locating mechanismtimeout
- the timeout in millisecondsparentElement
- find from the elementorg.openqa.selenium.NoSuchElementException
- when not foundpublic static void waitUntilEnabled(org.openqa.selenium.WebElement element, int timeout) throws org.openqa.selenium.NotFoundException
element
- the elementtimeout
- the timeout in millisecondsorg.openqa.selenium.NotFoundException
public static void waitUntilEnabled(org.openqa.selenium.WebElement element) throws org.openqa.selenium.NotFoundException
element
- the elementorg.openqa.selenium.NotFoundException
public LoginPage getLoginPage()
public <T extends AbstractPage> T nav(Class<T> pageClass, String linkText)
public DocumentBasePage login() throws DocumentBasePage.UserNotConnectedException
DocumentBasePage.UserNotConnectedException
public DocumentBasePage login(String username, String password) throws DocumentBasePage.UserNotConnectedException
Copyright © 2011 Nuxeo SA. All Rights Reserved.