public abstract class WebDriverITBase extends Object
Modifier and Type | Field and Description |
---|---|
org.openqa.selenium.WebDriver |
driver
Deprecated.
|
Constructor and Description |
---|
WebDriverITBase()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
acceptAlert()
Deprecated.
Accept the javascript alert (clicking OK)
|
void |
assertPopUpWindowUrl(org.openqa.selenium.By by,
String windowName,
String url)
Deprecated.
Assert that clicking an element causes a popup window with a specific URL
|
protected void |
checkForIncidentReport(JiraAwareFailable failable)
Deprecated.
|
protected void |
checkForIncidentReport(String locator,
JiraAwareFailable failable)
Deprecated.
|
protected void |
checkForIncidentReport(String locator,
JiraAwareFailable failable,
String message)
Deprecated.
|
protected void |
clearText(org.openqa.selenium.By by)
Deprecated.
Clear the text written in an input field by xpath of an element
|
protected void |
clearTextByName(String name)
Deprecated.
Clear the text written in an input field by name of an element
|
protected void |
clearTextByXpath(String locator)
Deprecated.
Clear the text written in an input field by xpath of an element
|
static void |
createAndStartService()
Deprecated.
|
protected void |
dismissAlert()
Deprecated.
Dismiss the javascript alert (clicking Cancel)
|
void |
fail(String message)
Deprecated.
|
protected String |
getAttribute(org.openqa.selenium.By by,
String attribute)
Deprecated.
Get value of any attribute of an element
|
protected String |
getAttributeByName(String name,
String attribute)
Deprecated.
Get value of any attribute by using element name
|
protected String |
getAttributeByXpath(String locator,
String attribute)
Deprecated.
Get value of any attribute by using element xpath
|
protected String |
getEval(String script)
Deprecated.
|
abstract String |
getTestUrl()
Deprecated.
Returns the URL to be used with this test
|
String |
getUserName()
Deprecated.
Override in test to define a user other than admin
|
boolean |
isElementPresent(org.openqa.selenium.By by)
Deprecated.
Check if an element is present
|
boolean |
isElementPresentQuick(org.openqa.selenium.By by)
Deprecated.
Quickly check if an element is present
|
void |
login(org.openqa.selenium.WebDriver driver,
String userName,
JiraAwareFailable failable)
Deprecated.
Logs in using the KRAD Login Page, if the JVM arg remote.autologin is set, auto login as admin will not be done.
|
void |
setUp()
Deprecated.
Setup the WebDriver test, login and load the tested web page
|
static void |
stopService()
Deprecated.
Tear down the WebDriver test
|
protected void |
switchWindow()
Deprecated.
Switch to new window
|
void |
tearDown()
Deprecated.
Tear down the WebDriver test
|
protected void |
waitAndClick(org.openqa.selenium.By by)
Deprecated.
|
protected void |
waitAndClick(org.openqa.selenium.By by,
String message)
Deprecated.
|
protected void |
waitAndClick(String locator)
Deprecated.
|
protected void |
waitAndClick(String locator,
String message)
Deprecated.
|
protected void |
waitAndClickByLinkText(String text)
Deprecated.
|
protected void |
waitAndClickByLinkText(String text,
String message)
Deprecated.
|
protected void |
waitAndType(org.openqa.selenium.By by,
String text)
Deprecated.
|
protected void |
waitAndType(org.openqa.selenium.By by,
String text,
String message)
Deprecated.
|
protected void |
waitAndTypeByName(String name,
String text)
Deprecated.
|
protected void |
waitAndTypeByXpath(String locator,
String text)
Deprecated.
|
protected void |
waitAndTypeByXpath(String locator,
String text,
String message)
Deprecated.
|
protected void |
waitFor(org.openqa.selenium.By by)
Deprecated.
|
protected void |
waitFor(org.openqa.selenium.By by,
String message)
Deprecated.
TODO Investigate using WebDriverUtils.waitFor
|
protected void |
waitForElementPresent(String locator)
Deprecated.
|
protected void |
waitForElementPresentByName(String name)
Deprecated.
|
protected void |
waitForElementPresentByXpath(String locator)
Deprecated.
|
public org.openqa.selenium.WebDriver driver
public WebDriverITBase()
public abstract String getTestUrl()
public String getUserName()
public static void createAndStartService() throws Exception
Exception
public void login(org.openqa.selenium.WebDriver driver, String userName, JiraAwareFailable failable) throws InterruptedException
Logs in using the KRAD Login Page, if the JVM arg remote.autologin is set, auto login as admin will not be done.
driver
- to login withuserName
- to login withfailable
- to fail on if there is a login problemInterruptedException
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 elementpublic 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 elementpublic 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 elementInterruptedException
protected void waitFor(org.openqa.selenium.By by, String message) throws InterruptedException
by
- The locating mechanism of the elementmessage
- User defined message to displayInterruptedException
protected void waitAndType(org.openqa.selenium.By by, String text) throws InterruptedException
by
- The locating mechanism of the elementtext
- The text to typeInterruptedException
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 displayInterruptedException
protected void waitAndTypeByXpath(String locator, String text) throws InterruptedException
locator
- The locating mechanism of the elementtext
- The text to typeInterruptedException
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 displayInterruptedException
protected void waitAndTypeByName(String name, String text) throws InterruptedException
name
- The name of the elementtext
- The text to typeInterruptedException
protected void clearTextByName(String name) throws InterruptedException
name
- The name of the elementInterruptedException
protected void clearTextByXpath(String locator) throws InterruptedException
locator
- The locating mechanism of the elementInterruptedException
protected void clearText(org.openqa.selenium.By by) throws InterruptedException
by
- method used for finding the elementInterruptedException
protected void dismissAlert()
protected void acceptAlert()
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 retrievedInterruptedException
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 retrievedInterruptedException
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 retrievedInterruptedException
protected void waitAndClickByLinkText(String text) throws InterruptedException
text
- text of the linkInterruptedException
protected void waitAndClickByLinkText(String text, String message) throws InterruptedException
text
- text of the linkmessage
- user defined message to displayInterruptedException
protected void waitAndClick(org.openqa.selenium.By by) throws InterruptedException
by
- method used for finding the elementInterruptedException
protected void waitAndClick(org.openqa.selenium.By by, String message) throws InterruptedException
by
- method used for finding the elementmessage
- user defined message to displayInterruptedException
protected void waitAndClick(String locator) throws InterruptedException
locator
- mechanism to locate element by xpathInterruptedException
protected void waitAndClick(String locator, String message) throws InterruptedException
locator
- mechanism to locate element by xpathmessage
- user defined message to displayInterruptedException
protected void waitForElementPresent(String locator) throws InterruptedException
locator
- mechanism to locate element by xpathInterruptedException
protected void waitForElementPresentByXpath(String locator) throws InterruptedException
locator
- mechanism to locate element by xpathInterruptedException
protected void waitForElementPresentByName(String name) throws InterruptedException
name
- name of an elementInterruptedException
protected void checkForIncidentReport(JiraAwareFailable failable)
protected void checkForIncidentReport(String locator, JiraAwareFailable failable)
protected void checkForIncidentReport(String locator, JiraAwareFailable failable, String message)
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.