|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.testtools.selenium.WebDriverITBase
public abstract class WebDriverITBase
Base class for Selenium Webdriver integration tests
Field Summary | |
---|---|
org.openqa.selenium.WebDriver |
driver
|
Constructor Summary | |
---|---|
WebDriverITBase()
|
Method Summary | |
---|---|
protected void |
acceptAlert()
Accept the javascript alert (clicking OK) |
void |
assertPopUpWindowUrl(org.openqa.selenium.By by,
String windowName,
String url)
Assert that clicking an element causes a popup window with a specific URL |
protected void |
checkForIncidentReport(Failable failable)
|
protected void |
checkForIncidentReport(String locator,
Failable failable)
|
protected void |
checkForIncidentReport(String locator,
Failable failable,
String message)
|
protected void |
clearText(org.openqa.selenium.By by)
Clear the text written in an input field by xpath of an element |
protected void |
clearTextByName(String name)
Clear the text written in an input field by name of an element |
protected void |
clearTextByXpath(String locator)
Clear the text written in an input field by xpath of an element |
static void |
createAndStartService()
|
protected void |
dismissAlert()
Dismiss the javascript alert (clicking Cancel) |
void |
fail(String message)
Fail in a framework appropriate way. |
protected String |
getAttribute(org.openqa.selenium.By by,
String attribute)
Get value of any attribute of an element |
protected String |
getAttributeByName(String name,
String attribute)
Get value of any attribute by using element name |
protected String |
getAttributeByXpath(String locator,
String attribute)
Get value of any attribute by using element xpath |
protected String |
getEval(String script)
|
abstract String |
getTestUrl()
Returns the URL to be used with this test |
String |
getUserName()
Override in test to define a user other than admin |
boolean |
isElementPresent(org.openqa.selenium.By by)
Check if an element is present |
boolean |
isElementPresentQuick(org.openqa.selenium.By by)
Quickly check if an element is present |
void |
setUp()
Setup the WebDriver test, login and load the tested web page |
static void |
stopService()
Tear down the WebDriver test |
protected void |
switchWindow()
Switch to new window |
void |
tearDown()
Tear down the WebDriver test |
protected void |
waitAndClick(org.openqa.selenium.By by)
|
protected void |
waitAndClick(org.openqa.selenium.By by,
String message)
|
protected void |
waitAndClick(String locator)
|
protected void |
waitAndClick(String locator,
String message)
|
protected void |
waitAndClickByLinkText(String text)
|
protected void |
waitAndClickByLinkText(String text,
String message)
|
protected void |
waitAndType(org.openqa.selenium.By by,
String text)
|
protected void |
waitAndType(org.openqa.selenium.By by,
String text,
String message)
|
protected void |
waitAndTypeByName(String name,
String text)
|
protected void |
waitAndTypeByXpath(String locator,
String text)
|
protected void |
waitAndTypeByXpath(String locator,
String text,
String message)
|
protected void |
waitFor(org.openqa.selenium.By by)
|
protected void |
waitFor(org.openqa.selenium.By by,
String message)
TODO Investigate using WebDriverUtil.waitFor |
protected void |
waitForElementPresent(String locator)
|
protected void |
waitForElementPresentByName(String name)
|
protected void |
waitForElementPresentByXpath(String locator)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public org.openqa.selenium.WebDriver driver
Constructor Detail |
---|
public WebDriverITBase()
Method Detail |
---|
public abstract String getTestUrl()
public String getUserName()
public static void createAndStartService() throws Exception
Exception
public void fail(String message)
Failable
fail
in interface Failable
message
- to display for the failure.public void setUp() throws Exception
Exception
public void tearDown() throws Exception
Exception
public static void stopService() throws Exception
Exception
public boolean isElementPresent(org.openqa.selenium.By by)
This test takes a while due to the 'implicit wait' time.
by
- The locating mechanism of the element
public boolean isElementPresentQuick(org.openqa.selenium.By by)
Just like isElementPresent(org.openqa.selenium.By)
but with a short 'implicit wait' time. Use this only
if it is guaranteed that all elements are rendered.
by
- The locating mechanism of the element
public void assertPopUpWindowUrl(org.openqa.selenium.By by, String windowName, String url)
by
- The locating mechanism of the element to be clickedwindowName
- The name of the popup windowurl
- The URL of the popup windowprotected void waitFor(org.openqa.selenium.By by) throws InterruptedException
by
- The locating mechanism of the element
InterruptedException
protected void waitFor(org.openqa.selenium.By by, String message) throws InterruptedException
by
- The locating mechanism of the elementmessage
- User defined message to display
InterruptedException
protected void waitAndType(org.openqa.selenium.By by, String text) throws InterruptedException
by
- The locating mechanism of the elementtext
- The text to type
InterruptedException
protected void waitAndType(org.openqa.selenium.By by, String text, String message) throws InterruptedException
by
- The locating mechanism of the elementtext
- The text to typemessage
- User defined message to display
InterruptedException
protected void waitAndTypeByXpath(String locator, String text) throws InterruptedException
locator
- The locating mechanism of the elementtext
- The text to type
InterruptedException
protected void waitAndTypeByXpath(String locator, String text, String message) throws InterruptedException
locator
- The locating mechanism of the elementtext
- The text to typemessage
- User defined message to display
InterruptedException
protected void waitAndTypeByName(String name, String text) throws InterruptedException
name
- The name of the elementtext
- The text to type
InterruptedException
protected void clearTextByName(String name) throws InterruptedException
name
- The name of the element
InterruptedException
protected void clearTextByXpath(String locator) throws InterruptedException
locator
- The locating mechanism of the element
InterruptedException
protected void clearText(org.openqa.selenium.By by) throws InterruptedException
by
- method used for finding the element
InterruptedException
protected void dismissAlert()
protected void acceptAlert()
protected String getEval(String script)
protected void switchWindow()
protected String getAttributeByName(String name, String attribute) throws InterruptedException
name
- name of an elementattribute
- the name of an attribute whose value is to be retrieved
InterruptedException
protected String getAttributeByXpath(String locator, String attribute) throws InterruptedException
locator
- locating mechanism of an elementattribute
- the name of an attribute whose value is to be retrieved
InterruptedException
protected String getAttribute(org.openqa.selenium.By by, String attribute) throws InterruptedException
by
- method used for finding the elementattribute
- the name of an attribute whose value is to be retrieved
InterruptedException
protected void waitAndClickByLinkText(String text) throws InterruptedException
text
- text of the link
InterruptedException
protected void waitAndClickByLinkText(String text, String message) throws InterruptedException
text
- text of the linkmessage
- user defined message to display
InterruptedException
protected void waitAndClick(org.openqa.selenium.By by) throws InterruptedException
by
- method used for finding the element
InterruptedException
protected void waitAndClick(org.openqa.selenium.By by, String message) throws InterruptedException
by
- method used for finding the elementmessage
- user defined message to display
InterruptedException
protected void waitAndClick(String locator) throws InterruptedException
locator
- mechanism to locate element by xpath
InterruptedException
protected void waitAndClick(String locator, String message) throws InterruptedException
locator
- mechanism to locate element by xpathmessage
- user defined message to display
InterruptedException
protected void waitForElementPresent(String locator) throws InterruptedException
locator
- mechanism to locate element by xpath
InterruptedException
protected void waitForElementPresentByXpath(String locator) throws InterruptedException
locator
- mechanism to locate element by xpath
InterruptedException
protected void waitForElementPresentByName(String name) throws InterruptedException
name
- name of an element
InterruptedException
protected void checkForIncidentReport(Failable failable)
protected void checkForIncidentReport(String locator, Failable failable)
protected void checkForIncidentReport(String locator, Failable failable, String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |