public abstract class SeleniumTestCase extends org.testng.Assert implements com.thoughtworks.selenium.Selenium
Selenium and delegates to an instance (setup once per test by
testStartup(org.testng.ITestContext, org.testng.xml.XmlTest).| Modifier and Type | Field and Description |
|---|---|
static String |
JETTY_7 |
static org.slf4j.Logger |
LOGGER |
static String |
PAGE_LOAD_TIMEOUT
15 seconds
|
protected com.thoughtworks.selenium.Selenium |
selenium
Deprecated.
|
static String |
SUBMIT
An XPath expression for locating a submit element (very commonly used
with
clickAndWait(String). |
static String |
TOMCAT_6 |
protected org.openqa.selenium.WebDriver |
webDriver |
| Constructor and Description |
|---|
SeleniumTestCase() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomRequestHeader(String key,
String value) |
void |
addLocationStrategy(String strategyName,
String functionDefinition) |
void |
addScript(String scriptContent,
String scriptTagId) |
void |
addSelection(String locator,
String optionLocator) |
void |
allowNativeXpath(String allow) |
void |
altKeyDown() |
void |
altKeyUp() |
void |
answerOnNextPrompt(String answer) |
protected void |
assertAttribute(String locator,
String expected)
Used when the locator identifies an attribute, not an element.
|
protected void |
assertFieldValue(String locator,
String expected)
Assets that the value in the field matches the expectation
|
protected void |
assertSourcePresent(String... expected)
Assets that each string provided is present somewhere in the current document.
|
protected void |
assertText(String locator,
String expected)
Asserts the text of an element, identified by the locator.
|
protected void |
assertTextPresent(String... text) |
protected void |
assertTitle(String expected)
Asserts that the current page's title matches the expected value.
|
void |
assignId(String locator,
String identifier) |
void |
attachFile(String fieldLocator,
String fileLocator) |
void |
captureEntirePageScreenshot(String filename,
String kwargs) |
String |
captureEntirePageScreenshotToString(String kwargs) |
String |
captureNetworkTraffic(String type) |
void |
captureScreenshot(String filename) |
String |
captureScreenshotToString() |
void |
check(String locator) |
void |
chooseCancelOnNextConfirmation() |
void |
chooseOkOnNextConfirmation() |
void |
cleanup() |
void |
cleanupTestMethod() |
void |
click(String locator) |
protected void |
clickAndWait(String locator)
Click a link identified by a locator, then wait for the resulting page to load.
|
void |
clickAt(String locator,
String coordString) |
void |
close() |
void |
contextMenu(String locator) |
void |
contextMenuAt(String locator,
String coordString) |
void |
controlKeyDown() |
void |
controlKeyUp() |
protected static org.openqa.selenium.By |
convertLocator(String locator) |
void |
createCookie(String nameValuePair,
String optionsString) |
void |
deleteAllVisibleCookies() |
void |
deleteCookie(String name,
String optionsString) |
void |
deselectPopUp() |
void |
doubleClick(String locator) |
void |
doubleClickAt(String locator,
String coordString) |
void |
dragAndDrop(String locator,
String movementsString) |
void |
dragAndDropToObject(String locatorOfObjectToBeDragged,
String locatorOfDragDestinationObject) |
void |
dragdrop(String locator,
String movementsString) |
void |
fireEvent(String locator,
String eventName) |
void |
focus(String locator) |
String |
getAlert() |
String[] |
getAllButtons() |
String[] |
getAllFields() |
String[] |
getAllLinks() |
String[] |
getAllWindowIds() |
String[] |
getAllWindowNames() |
String[] |
getAllWindowTitles() |
String |
getAttribute(String attributeLocator) |
String[] |
getAttributeFromAllWindows(String attributeName) |
String |
getBaseURL()
Returns the base URL for the application.
|
String |
getBodyText() |
String |
getConfirmation() |
String |
getCookie() |
String |
getCookieByName(String name) |
Number |
getCssCount(String str) |
Number |
getCursorPosition(String locator) |
Number |
getElementHeight(String locator) |
Number |
getElementIndex(String locator) |
Number |
getElementPositionLeft(String locator) |
Number |
getElementPositionTop(String locator) |
Number |
getElementWidth(String locator) |
String |
getEval(String script) |
String |
getExpression(String expression) |
String |
getHtmlSource() |
String |
getLocation() |
String |
getLog() |
Number |
getMouseSpeed() |
String |
getPrompt() |
String |
getSelectedId(String selectLocator) |
String[] |
getSelectedIds(String selectLocator) |
String |
getSelectedIndex(String selectLocator) |
String[] |
getSelectedIndexes(String selectLocator) |
String |
getSelectedLabel(String selectLocator) |
String[] |
getSelectedLabels(String selectLocator) |
String |
getSelectedValue(String selectLocator) |
String[] |
getSelectedValues(String selectLocator) |
String[] |
getSelectOptions(String selectLocator) |
String |
getSpeed() |
String |
getTable(String tableCellAddress) |
String |
getText(String locator) |
String |
getTitle() |
String |
getValue(String locator) |
boolean |
getWhetherThisFrameMatchFrameExpression(String currentFrameString,
String target) |
boolean |
getWhetherThisWindowMatchWindowExpression(String currentWindowString,
String target) |
Number |
getXpathCount(String xpath) |
void |
goBack() |
void |
highlight(String locator) |
void |
ignoreAttributesWithoutValue(String ignore) |
void |
indicateTestMethodName(Method testMethod) |
boolean |
isAlertPresent() |
boolean |
isChecked(String locator) |
boolean |
isConfirmationPresent() |
boolean |
isCookiePresent(String name) |
boolean |
isEditable(String locator) |
boolean |
isElementPresent(String locator) |
boolean |
isOrdered(String locator1,
String locator2) |
boolean |
isPromptPresent() |
boolean |
isSomethingSelected(String selectLocator) |
boolean |
isTextPresent(String pattern) |
boolean |
isVisible(String locator) |
void |
keyDown(String locator,
String keySequence) |
void |
keyDownNative(String keycode) |
void |
keyPress(String locator,
String keySequence) |
void |
keyPressNative(String keycode) |
void |
keyUp(String locator,
String keySequence) |
void |
keyUpNative(String keycode) |
protected Runnable |
launchWebServer(String container,
String webAppFolder,
String contextPath,
int port,
int sslPort)
Invoked from
testStartup(org.testng.ITestContext, org.testng.xml.XmlTest) to launch the web
server to be tested. |
void |
metaKeyDown() |
void |
metaKeyUp() |
void |
mouseDown(String locator) |
void |
mouseDownAt(String locator,
String coordString) |
void |
mouseDownRight(String locator) |
void |
mouseDownRightAt(String locator,
String coordString) |
void |
mouseMove(String locator) |
void |
mouseMoveAt(String locator,
String coordString) |
void |
mouseOut(String locator) |
void |
mouseOver(String locator) |
void |
mouseUp(String locator) |
void |
mouseUpAt(String locator,
String coordString) |
void |
mouseUpRight(String locator) |
void |
mouseUpRightAt(String locator,
String coordString) |
void |
open(String url) |
void |
open(String url,
String ignoreResponseCode) |
protected void |
openBaseURL()
Open the getBaseURL(), and waits for the page to load.
|
protected void |
openLinks(String... linkText)
Opens the base URL, then clicks through a series of links to get to a desired application
state.
|
void |
openWindow(String url,
String windowID) |
void |
refresh() |
void |
removeAllSelections(String locator) |
void |
removeScript(String scriptTagId) |
void |
removeSelection(String locator,
String optionLocator) |
protected void |
reportAndThrowAssertionError(String message,
Object... arguments)
Formats a message from the provided arguments, which is written to System.err.
|
String |
retrieveLastRemoteControlLogs() |
void |
rollup(String rollupName,
String kwargs) |
void |
runScript(String script) |
void |
scrollIntoView(org.openqa.selenium.WebElement element) |
void |
select(String selectLocator,
String optionLocator) |
void |
selectFrame(String locator) |
void |
selectPopUp(String windowID) |
void |
selectWindow(String windowID) |
void |
setBrowserLogLevel(String logLevel) |
void |
setContext(String context) |
void |
setCursorPosition(String locator,
String position) |
void |
setExtensionJs(String extensionJs) |
void |
setMouseSpeed(String pixels) |
void |
setSpeed(String value) |
void |
setTimeout(String timeout) |
void |
setup(org.testng.ITestContext context) |
void |
shiftKeyDown() |
void |
shiftKeyUp() |
void |
showContextualBanner() |
void |
showContextualBanner(String className,
String methodName) |
void |
shutDownSeleniumServer() |
protected void |
sleep(long millis)
Sleeps for the indicated number of seconds.
|
void |
start() |
void |
start(Object optionsObject) |
void |
start(String optionsString) |
void |
stop() |
void |
submit(String formLocator) |
void |
testShutdown(org.testng.ITestContext context)
Like
testStartup(org.testng.ITestContext, org.testng.xml.XmlTest) , this may
be called multiple times against multiple instances, but only does work the first time. |
void |
testStartup(org.testng.ITestContext testContext,
org.testng.xml.XmlTest xmlTest)
Starts up the servers for the entire test (i.e., for multiple TestCases).
|
void |
type(String locator,
String value) |
void |
typeKeys(String locator,
String value) |
void |
uncheck(String locator) |
protected void |
unreachable() |
void |
useXpathLibrary(String libraryName) |
protected void |
waitForAjaxRequestsToComplete()
Waits until all active XHR requests (as noted by the t5/core/dom module)
have completed.
|
protected void |
waitForAjaxRequestsToComplete(String timeout)
Deprecated.
Deprecated in 5.4 in favor of the version without a timeout
|
protected void |
waitForCondition(org.openqa.selenium.support.ui.ExpectedCondition condition) |
protected void |
waitForCondition(org.openqa.selenium.support.ui.ExpectedCondition condition,
long timeoutSeconds) |
void |
waitForCondition(String script,
String timeout) |
protected void |
waitForCssSelectorToAppear(String selector)
Waits for an element with a given CSS selector to appear.
|
protected void |
waitForElementToAppear(String elementId)
Waits for the element with the given client-side id to be present in the DOM (
does not assure that the element is visible).
|
protected void |
waitForElementToDisappear(String elementId)
Deprecated.
Deprecated in 5.4 with no replacement
|
void |
waitForFrameToLoad(String frameAddress,
String timeout) |
protected void |
waitForInvisible(String selector)
Waits for the element specified by the selector to become invisible
Note that waitForElementToDisappear waits for the element to be absent from the dom, visible or not.
|
protected void |
waitForPageToLoad()
Waits for the page to load (up to 15 seconds).
|
void |
waitForPageToLoad(String timeout)
Waits for page to load, then waits for initialization to finish, which is recognized by the
data-page-initialized attribute
being set to true on the body element. |
void |
waitForPopUp(String windowID,
String timeout) |
protected void |
waitForVisible(String selector)
Waits for the element specified by the selector to become visible
Note that waitForElementToAppear waits for the element to be present in the dom, visible or not.
|
void |
windowFocus() |
void |
windowMaximize() |
protected void |
writeErrorReport(String reportText)
Delegates to
ErrorReporter.writeErrorReport(String) to capture the current page markup in a
file for later analysis. |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsNoOrder, assertEqualsNoOrder, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failpublic static final org.slf4j.Logger LOGGER
public static final String PAGE_LOAD_TIMEOUT
public static final String TOMCAT_6
public static final String JETTY_7
public static final String SUBMIT
clickAndWait(String).@Deprecated protected com.thoughtworks.selenium.Selenium selenium
Selenium instance that all the methods of this class delegate to;
this can be useful when attempting to use SeleniumTestCase with a newer version of Selenium which
has added some methods to the interface. This field will not be set until the test case instance
has gone through its full initialization.protected org.openqa.selenium.WebDriver webDriver
public SeleniumTestCase()
public void testStartup(org.testng.ITestContext testContext, org.testng.xml.XmlTest xmlTest) throws Exception
tapestry.browser-start-command parameter,
to run tests against multiple browsers.
| Parameter | Name | Default | Description |
|---|---|---|---|
| container | tapestry.servlet-container | JETTY_7 | The Servlet container to use for the tests. Currently JETTY_7 or TOMCAT_6 |
| webAppFolder | tapestry.web-app-folder | src/main/webapp | Location of web application context |
| contextPath | tapestry.context-path | empty string | Context path (defaults to root). As elsewhere, the context path should be blank, or start with a slash (but not end with one). |
| port | tapestry.port | 9090 | Port number for web server to listen to |
| sslPort | tapestry.ssl-port | 8443 | Port number for web server to listen to for secure requests |
| browserStartCommand | tapestry.browser-start-command | *firefox | Command string used to launch the browser, as defined by Selenium |
ITestContext to see if the necessary keys are already present).testContext - Used to share objects between the launcher and the test suitesExceptionpublic void testShutdown(org.testng.ITestContext context)
testStartup(org.testng.ITestContext, org.testng.xml.XmlTest) , this may
be called multiple times against multiple instances, but only does work the first time.protected Runnable launchWebServer(String container, String webAppFolder, String contextPath, int port, int sslPort) throws Exception
testStartup(org.testng.ITestContext, org.testng.xml.XmlTest) to launch the web
server to be tested. The return value is a Runnable that can be invoked later to cleanly shut down the launched
server at the end of the test.container - identifies which web server should be launchedwebAppFolder - path to the web application contextcontextPath - the path the context is mapped to, usually the empty stringport - the port number the server should handlesslPort - the port number on which the server should handle secure requestsExceptionpublic void setup(org.testng.ITestContext context)
public void cleanup()
protected void writeErrorReport(String reportText)
ErrorReporter.writeErrorReport(String) to capture the current page markup in a
file for later analysis.public String getBaseURL()
http://localhost:9999/ (i.e., it
includes a trailing slash).
Generally, you should use openLinks(String...) to start from your application's home page.public void indicateTestMethodName(Method testMethod)
public void cleanupTestMethod()
public void addCustomRequestHeader(String key, String value)
addCustomRequestHeader in interface com.thoughtworks.selenium.Seleniumpublic void addLocationStrategy(String strategyName, String functionDefinition)
addLocationStrategy in interface com.thoughtworks.selenium.Seleniumpublic void addScript(String scriptContent, String scriptTagId)
addScript in interface com.thoughtworks.selenium.Seleniumpublic void addSelection(String locator, String optionLocator)
addSelection in interface com.thoughtworks.selenium.Seleniumpublic void allowNativeXpath(String allow)
allowNativeXpath in interface com.thoughtworks.selenium.Seleniumpublic void altKeyDown()
altKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void altKeyUp()
altKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void answerOnNextPrompt(String answer)
answerOnNextPrompt in interface com.thoughtworks.selenium.Seleniumpublic void assignId(String locator, String identifier)
assignId in interface com.thoughtworks.selenium.Seleniumpublic void attachFile(String fieldLocator, String fileLocator)
attachFile in interface com.thoughtworks.selenium.Seleniumpublic void captureEntirePageScreenshot(String filename, String kwargs)
captureEntirePageScreenshot in interface com.thoughtworks.selenium.Seleniumpublic String captureEntirePageScreenshotToString(String kwargs)
captureEntirePageScreenshotToString in interface com.thoughtworks.selenium.Seleniumpublic String captureNetworkTraffic(String type)
captureNetworkTraffic in interface com.thoughtworks.selenium.Seleniumpublic void captureScreenshot(String filename)
captureScreenshot in interface com.thoughtworks.selenium.Seleniumpublic String captureScreenshotToString()
captureScreenshotToString in interface com.thoughtworks.selenium.Seleniumpublic void check(String locator)
check in interface com.thoughtworks.selenium.Seleniumpublic void chooseCancelOnNextConfirmation()
chooseCancelOnNextConfirmation in interface com.thoughtworks.selenium.Seleniumpublic void chooseOkOnNextConfirmation()
chooseOkOnNextConfirmation in interface com.thoughtworks.selenium.Seleniumpublic void click(String locator)
click in interface com.thoughtworks.selenium.Seleniumpublic void clickAt(String locator, String coordString)
clickAt in interface com.thoughtworks.selenium.Seleniumpublic void close()
close in interface com.thoughtworks.selenium.Seleniumpublic void contextMenu(String locator)
contextMenu in interface com.thoughtworks.selenium.Seleniumpublic void contextMenuAt(String locator, String coordString)
contextMenuAt in interface com.thoughtworks.selenium.Seleniumpublic void controlKeyDown()
controlKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void controlKeyUp()
controlKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void createCookie(String nameValuePair, String optionsString)
createCookie in interface com.thoughtworks.selenium.Seleniumpublic void deleteAllVisibleCookies()
deleteAllVisibleCookies in interface com.thoughtworks.selenium.Seleniumpublic void deleteCookie(String name, String optionsString)
deleteCookie in interface com.thoughtworks.selenium.Seleniumpublic void deselectPopUp()
deselectPopUp in interface com.thoughtworks.selenium.Seleniumpublic void doubleClick(String locator)
doubleClick in interface com.thoughtworks.selenium.Seleniumpublic void doubleClickAt(String locator, String coordString)
doubleClickAt in interface com.thoughtworks.selenium.Seleniumpublic void dragAndDrop(String locator, String movementsString)
dragAndDrop in interface com.thoughtworks.selenium.Seleniumpublic void dragAndDropToObject(String locatorOfObjectToBeDragged, String locatorOfDragDestinationObject)
dragAndDropToObject in interface com.thoughtworks.selenium.Seleniumpublic void dragdrop(String locator, String movementsString)
dragdrop in interface com.thoughtworks.selenium.Seleniumpublic void fireEvent(String locator, String eventName)
fireEvent in interface com.thoughtworks.selenium.Seleniumpublic void focus(String locator)
focus in interface com.thoughtworks.selenium.Seleniumpublic String getAlert()
getAlert in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllButtons()
getAllButtons in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllFields()
getAllFields in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllLinks()
getAllLinks in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllWindowIds()
getAllWindowIds in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllWindowNames()
getAllWindowNames in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllWindowTitles()
getAllWindowTitles in interface com.thoughtworks.selenium.Seleniumpublic String getAttribute(String attributeLocator)
getAttribute in interface com.thoughtworks.selenium.Seleniumpublic String[] getAttributeFromAllWindows(String attributeName)
getAttributeFromAllWindows in interface com.thoughtworks.selenium.Seleniumpublic String getBodyText()
getBodyText in interface com.thoughtworks.selenium.Seleniumpublic String getConfirmation()
getConfirmation in interface com.thoughtworks.selenium.Seleniumpublic String getCookie()
getCookie in interface com.thoughtworks.selenium.Seleniumpublic String getCookieByName(String name)
getCookieByName in interface com.thoughtworks.selenium.Seleniumpublic Number getCursorPosition(String locator)
getCursorPosition in interface com.thoughtworks.selenium.Seleniumpublic Number getElementHeight(String locator)
getElementHeight in interface com.thoughtworks.selenium.Seleniumpublic Number getElementIndex(String locator)
getElementIndex in interface com.thoughtworks.selenium.Seleniumpublic Number getElementPositionLeft(String locator)
getElementPositionLeft in interface com.thoughtworks.selenium.Seleniumpublic Number getElementPositionTop(String locator)
getElementPositionTop in interface com.thoughtworks.selenium.Seleniumpublic Number getElementWidth(String locator)
getElementWidth in interface com.thoughtworks.selenium.Seleniumpublic String getEval(String script)
getEval in interface com.thoughtworks.selenium.Seleniumpublic String getExpression(String expression)
getExpression in interface com.thoughtworks.selenium.Seleniumpublic String getHtmlSource()
getHtmlSource in interface com.thoughtworks.selenium.Seleniumpublic String getLocation()
getLocation in interface com.thoughtworks.selenium.Seleniumpublic Number getMouseSpeed()
getMouseSpeed in interface com.thoughtworks.selenium.Seleniumpublic String getPrompt()
getPrompt in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedId(String selectLocator)
getSelectedId in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedIds(String selectLocator)
getSelectedIds in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedIndex(String selectLocator)
getSelectedIndex in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedIndexes(String selectLocator)
getSelectedIndexes in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedLabel(String selectLocator)
getSelectedLabel in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedLabels(String selectLocator)
getSelectedLabels in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedValue(String selectLocator)
getSelectedValue in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedValues(String selectLocator)
getSelectedValues in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectOptions(String selectLocator)
getSelectOptions in interface com.thoughtworks.selenium.Seleniumpublic String getSpeed()
getSpeed in interface com.thoughtworks.selenium.Seleniumpublic String getTable(String tableCellAddress)
getTable in interface com.thoughtworks.selenium.Seleniumpublic String getText(String locator)
getText in interface com.thoughtworks.selenium.Seleniumpublic String getTitle()
getTitle in interface com.thoughtworks.selenium.Seleniumpublic String getValue(String locator)
getValue in interface com.thoughtworks.selenium.Seleniumpublic boolean getWhetherThisFrameMatchFrameExpression(String currentFrameString, String target)
getWhetherThisFrameMatchFrameExpression in interface com.thoughtworks.selenium.Seleniumpublic boolean getWhetherThisWindowMatchWindowExpression(String currentWindowString, String target)
getWhetherThisWindowMatchWindowExpression in interface com.thoughtworks.selenium.Seleniumpublic Number getXpathCount(String xpath)
getXpathCount in interface com.thoughtworks.selenium.Seleniumpublic void goBack()
goBack in interface com.thoughtworks.selenium.Seleniumpublic void highlight(String locator)
highlight in interface com.thoughtworks.selenium.Seleniumpublic void ignoreAttributesWithoutValue(String ignore)
ignoreAttributesWithoutValue in interface com.thoughtworks.selenium.Seleniumpublic boolean isAlertPresent()
isAlertPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isChecked(String locator)
isChecked in interface com.thoughtworks.selenium.Seleniumpublic boolean isConfirmationPresent()
isConfirmationPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isCookiePresent(String name)
isCookiePresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isEditable(String locator)
isEditable in interface com.thoughtworks.selenium.Seleniumpublic boolean isElementPresent(String locator)
isElementPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isOrdered(String locator1, String locator2)
isOrdered in interface com.thoughtworks.selenium.Seleniumpublic boolean isPromptPresent()
isPromptPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isSomethingSelected(String selectLocator)
isSomethingSelected in interface com.thoughtworks.selenium.Seleniumpublic boolean isTextPresent(String pattern)
isTextPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isVisible(String locator)
isVisible in interface com.thoughtworks.selenium.Seleniumpublic void keyDown(String locator, String keySequence)
keyDown in interface com.thoughtworks.selenium.Seleniumpublic void keyDownNative(String keycode)
keyDownNative in interface com.thoughtworks.selenium.Seleniumpublic void keyPress(String locator, String keySequence)
keyPress in interface com.thoughtworks.selenium.Seleniumpublic void keyPressNative(String keycode)
keyPressNative in interface com.thoughtworks.selenium.Seleniumpublic void keyUp(String locator, String keySequence)
keyUp in interface com.thoughtworks.selenium.Seleniumpublic void keyUpNative(String keycode)
keyUpNative in interface com.thoughtworks.selenium.Seleniumpublic void metaKeyDown()
metaKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void metaKeyUp()
metaKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void mouseDown(String locator)
mouseDown in interface com.thoughtworks.selenium.Seleniumpublic void mouseDownAt(String locator, String coordString)
mouseDownAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseDownRight(String locator)
mouseDownRight in interface com.thoughtworks.selenium.Seleniumpublic void mouseDownRightAt(String locator, String coordString)
mouseDownRightAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseMove(String locator)
mouseMove in interface com.thoughtworks.selenium.Seleniumpublic void mouseMoveAt(String locator, String coordString)
mouseMoveAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseOut(String locator)
mouseOut in interface com.thoughtworks.selenium.Seleniumpublic void mouseOver(String locator)
mouseOver in interface com.thoughtworks.selenium.Seleniumpublic void mouseUp(String locator)
mouseUp in interface com.thoughtworks.selenium.Seleniumpublic void mouseUpAt(String locator, String coordString)
mouseUpAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseUpRight(String locator)
mouseUpRight in interface com.thoughtworks.selenium.Seleniumpublic void mouseUpRightAt(String locator, String coordString)
mouseUpRightAt in interface com.thoughtworks.selenium.Seleniumpublic void open(String url)
open in interface com.thoughtworks.selenium.Seleniumpublic void open(String url, String ignoreResponseCode)
open in interface com.thoughtworks.selenium.Seleniumpublic void openWindow(String url, String windowID)
openWindow in interface com.thoughtworks.selenium.Seleniumpublic void refresh()
refresh in interface com.thoughtworks.selenium.Seleniumpublic void removeAllSelections(String locator)
removeAllSelections in interface com.thoughtworks.selenium.Seleniumpublic void removeScript(String scriptTagId)
removeScript in interface com.thoughtworks.selenium.Seleniumpublic void removeSelection(String locator, String optionLocator)
removeSelection in interface com.thoughtworks.selenium.Seleniumpublic String retrieveLastRemoteControlLogs()
retrieveLastRemoteControlLogs in interface com.thoughtworks.selenium.Seleniumpublic void rollup(String rollupName, String kwargs)
rollup in interface com.thoughtworks.selenium.Seleniumpublic void runScript(String script)
runScript in interface com.thoughtworks.selenium.Seleniumpublic void select(String selectLocator, String optionLocator)
select in interface com.thoughtworks.selenium.Seleniumpublic void selectFrame(String locator)
selectFrame in interface com.thoughtworks.selenium.Seleniumpublic void selectPopUp(String windowID)
selectPopUp in interface com.thoughtworks.selenium.Seleniumpublic void selectWindow(String windowID)
selectWindow in interface com.thoughtworks.selenium.Seleniumpublic void setBrowserLogLevel(String logLevel)
setBrowserLogLevel in interface com.thoughtworks.selenium.Seleniumpublic void setContext(String context)
setContext in interface com.thoughtworks.selenium.Seleniumpublic void setCursorPosition(String locator, String position)
setCursorPosition in interface com.thoughtworks.selenium.Seleniumpublic void setExtensionJs(String extensionJs)
setExtensionJs in interface com.thoughtworks.selenium.Seleniumpublic void setMouseSpeed(String pixels)
setMouseSpeed in interface com.thoughtworks.selenium.Seleniumpublic void setSpeed(String value)
setSpeed in interface com.thoughtworks.selenium.Seleniumpublic void setTimeout(String timeout)
setTimeout in interface com.thoughtworks.selenium.Seleniumpublic void shiftKeyDown()
shiftKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void shiftKeyUp()
shiftKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void showContextualBanner()
showContextualBanner in interface com.thoughtworks.selenium.Seleniumpublic void showContextualBanner(String className, String methodName)
showContextualBanner in interface com.thoughtworks.selenium.Seleniumpublic void shutDownSeleniumServer()
shutDownSeleniumServer in interface com.thoughtworks.selenium.Seleniumpublic void start()
start in interface com.thoughtworks.selenium.Seleniumpublic void start(Object optionsObject)
start in interface com.thoughtworks.selenium.Seleniumpublic void start(String optionsString)
start in interface com.thoughtworks.selenium.Seleniumpublic void stop()
stop in interface com.thoughtworks.selenium.Seleniumpublic void submit(String formLocator)
submit in interface com.thoughtworks.selenium.Seleniumpublic void type(String locator, String value)
type in interface com.thoughtworks.selenium.Seleniumpublic void typeKeys(String locator, String value)
typeKeys in interface com.thoughtworks.selenium.Seleniumpublic void uncheck(String locator)
uncheck in interface com.thoughtworks.selenium.Seleniumpublic void useXpathLibrary(String libraryName)
useXpathLibrary in interface com.thoughtworks.selenium.Seleniumpublic void waitForCondition(String script, String timeout)
waitForCondition in interface com.thoughtworks.selenium.Seleniumprotected void waitForCondition(org.openqa.selenium.support.ui.ExpectedCondition condition)
protected void waitForCondition(org.openqa.selenium.support.ui.ExpectedCondition condition, long timeoutSeconds)
public void waitForFrameToLoad(String frameAddress, String timeout)
waitForFrameToLoad in interface com.thoughtworks.selenium.Seleniumpublic void waitForPageToLoad(String timeout)
data-page-initialized attribute
being set to true on the body element. Polls at increasing intervals, for up-to 30 seconds (that's extraordinarily long, but helps sometimes
when manually debugging a page that doesn't have the floating console enabled)..waitForPageToLoad in interface com.thoughtworks.selenium.Seleniumpublic void waitForPopUp(String windowID, String timeout)
waitForPopUp in interface com.thoughtworks.selenium.Seleniumpublic void windowFocus()
windowFocus in interface com.thoughtworks.selenium.Seleniumpublic void windowMaximize()
windowMaximize in interface com.thoughtworks.selenium.Seleniumpublic void scrollIntoView(org.openqa.selenium.WebElement element)
protected final void reportAndThrowAssertionError(String message, Object... arguments)
message - arguments - protected final void unreachable()
protected final void openBaseURL()
protected final void assertText(String locator, String expected)
locator - identifies the element whose text value is to be assertedexpected - expected value for the element's textprotected final void assertTextPresent(String... text)
protected final void assertSourcePresent(String... expected)
expected - string expected to be presentprotected final void clickAndWait(String locator)
locator - identifies the link to clickprotected final void waitForPageToLoad()
protected final void assertAttribute(String locator, String expected)
locator - identifies the attribute whose value is to be assertedexpected - expected value for the attributeprotected final void assertFieldValue(String locator, String expected)
locator - identifies the fieldexpected - expected value for the fieldprotected final void openLinks(String... linkText)
protected final void sleep(long millis)
protected final void waitForElementToAppear(String elementId)
elementId - identifies the elementprotected final void waitForCssSelectorToAppear(String selector)
selector - the CSS selector to wait.protected final void waitForElementToDisappear(String elementId)
elementId - client-side id of elementprotected final void waitForVisible(String selector)
selector - element selectorprotected final void waitForInvisible(String selector)
selector - element selectorprotected final void assertTitle(String expected)
expected - value for titleprotected final void waitForAjaxRequestsToComplete(String timeout)
timeout - timeout to wait for (no longer used)protected final void waitForAjaxRequestsToComplete()
public Number getCssCount(String str)
getCssCount in interface com.thoughtworks.selenium.Seleniumprotected static org.openqa.selenium.By convertLocator(String locator)
5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.