Package org.apache.tapestry5.test
Class SeleniumTestCase
java.lang.Object
org.testng.Assert
org.apache.tapestry5.test.SeleniumTestCase
- All Implemented Interfaces:
com.thoughtworks.selenium.Selenium
public abstract class SeleniumTestCase
extends org.testng.Assert
implements com.thoughtworks.selenium.Selenium
Base class for creating Selenium-based integration test cases. This class implements all the
methods of
Selenium
and delegates to an instance (setup once per test by
testStartup(org.testng.ITestContext, org.testng.xml.XmlTest)
.- Since:
- 5.2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.testng.Assert
org.testng.Assert.ThrowingRunnable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final org.slf4j.Logger
static final String
15 secondsprotected com.thoughtworks.selenium.Selenium
Deprecated.static final String
An XPath expression for locating a submit element (very commonly used withclickAndWait(String)
.static final String
protected org.openqa.selenium.WebDriver
Fields inherited from class org.testng.Assert
ARRAY_MISMATCH_TEMPLATE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCustomRequestHeader
(String key, String value) void
addLocationStrategy
(String strategyName, String functionDefinition) void
void
addSelection
(String locator, String optionLocator) void
allowNativeXpath
(String allow) void
void
altKeyUp()
void
answerOnNextPrompt
(String answer) protected final void
assertAttribute
(String locator, String expected) Used when the locator identifies an attribute, not an element.protected final void
assertFieldValue
(String locator, String expected) Assets that the value in the field matches the expectationprotected final void
assertSourcePresent
(String... expected) Assets that each string provided is present somewhere in the current document.protected final void
assertText
(String locator, String expected) Asserts the text of an element, identified by the locator.protected final void
assertTextNotPresent
(String... text) protected final void
assertTextPresent
(String... text) protected final void
assertTitle
(String expected) Asserts that the current page's title matches the expected value.void
void
attachFile
(String fieldLocator, String fileLocator) void
captureEntirePageScreenshot
(String filename, String kwargs) captureNetworkTraffic
(String type) void
captureScreenshot
(String filename) void
void
void
void
cleanup()
void
void
protected final void
clickAndWait
(String locator) Click a link identified by a locator, then wait for the resulting page to load.void
void
close()
void
contextMenu
(String locator) void
contextMenuAt
(String locator, String coordString) void
void
protected static org.openqa.selenium.By
convertLocator
(String locator) void
createCookie
(String nameValuePair, String optionsString) void
void
deleteCookie
(String name, String optionsString) void
void
doubleClick
(String locator) void
doubleClickAt
(String locator, String coordString) void
dragAndDrop
(String locator, String movementsString) void
dragAndDropToObject
(String locatorOfObjectToBeDragged, String locatorOfDragDestinationObject) void
void
void
getAlert()
String[]
String[]
String[]
String[]
String[]
String[]
getAttribute
(String attributeLocator) String[]
getAttributeFromAllWindows
(String attributeName) Returns the base URL for the application.getCookieByName
(String name) getCssCount
(String str) getCursorPosition
(String locator) getElementHeight
(String locator) getElementIndex
(String locator) getElementPositionLeft
(String locator) getElementPositionTop
(String locator) getElementWidth
(String locator) getExpression
(String expression) getLog()
getSelectedId
(String selectLocator) String[]
getSelectedIds
(String selectLocator) getSelectedIndex
(String selectLocator) String[]
getSelectedIndexes
(String selectLocator) getSelectedLabel
(String selectLocator) String[]
getSelectedLabels
(String selectLocator) getSelectedValue
(String selectLocator) String[]
getSelectedValues
(String selectLocator) String[]
getSelectOptions
(String selectLocator) getSpeed()
getTitle()
boolean
getWhetherThisFrameMatchFrameExpression
(String currentFrameString, String target) boolean
getWhetherThisWindowMatchWindowExpression
(String currentWindowString, String target) getXpathCount
(String xpath) void
goBack()
void
void
ignoreAttributesWithoutValue
(String ignore) void
indicateTestMethodName
(Method testMethod) boolean
boolean
boolean
boolean
isCookiePresent
(String name) boolean
isEditable
(String locator) boolean
isElementPresent
(String locator) boolean
boolean
boolean
isSomethingSelected
(String selectLocator) boolean
isTextPresent
(String pattern) boolean
void
void
keyDownNative
(String keycode) void
void
keyPressNative
(String keycode) void
void
keyUpNative
(String keycode) protected Runnable
launchWebServer
(String container, String webAppFolder, String contextPath, int port, int sslPort) Invoked fromtestStartup(org.testng.ITestContext, org.testng.xml.XmlTest)
to launch the web server to be tested.void
void
void
void
mouseDownAt
(String locator, String coordString) void
mouseDownRight
(String locator) void
mouseDownRightAt
(String locator, String coordString) void
void
mouseMoveAt
(String locator, String coordString) void
void
void
void
void
mouseUpRight
(String locator) void
mouseUpRightAt
(String locator, String coordString) void
void
protected final void
Open the getBaseURL(), and waits for the page to load.protected final void
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 final void
reportAndThrowAssertionError
(String message, Object... arguments) Formats a message from the provided arguments, which is written to System.err.void
void
void
scrollIntoView
(org.openqa.selenium.WebElement element) void
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
void
setTimeout
(String timeout) void
setup
(org.testng.ITestContext context) void
void
void
void
showContextualBanner
(String className, String methodName) void
protected final void
sleep
(long millis) Sleeps for the indicated number of seconds.void
start()
void
void
void
stop()
void
void
testShutdown
(org.testng.ITestContext context) LiketestStartup(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
void
void
protected final void
void
useXpathLibrary
(String libraryName) protected final void
Waits until all active XHR requests (as noted by the t5/core/dom module) have completed.protected final void
waitForAjaxRequestsToComplete
(String timeout) Deprecated.Deprecated in 5.4 in favor of the version without a timeoutvoid
waitForCondition
(String script, String timeout) protected void
waitForCondition
(org.openqa.selenium.support.ui.ExpectedCondition condition) protected void
waitForCondition
(org.openqa.selenium.support.ui.ExpectedCondition condition, long timeoutSeconds) protected final void
waitForCssSelectorToAppear
(String selector) Waits for an element with a given CSS selector to appear.protected final 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 final void
waitForElementToDisappear
(String elementId) Deprecated.Deprecated in 5.4 with no replacementvoid
waitForFrameToLoad
(String frameAddress, String timeout) protected final 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 final void
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 thedata-page-initialized
attribute being set to true on the body element.void
waitForPopUp
(String windowID, String timeout) protected final 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
void
protected void
writeErrorReport
(String reportText) Delegates toErrorReporter.writeErrorReport(String)
to capture the current page markup in a file for later analysis.Methods inherited from class org.testng.Assert
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, 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, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsDeep, assertEqualsDeep, assertEqualsDeep, assertEqualsNoOrder, assertEqualsNoOrder, assertEqualsNoOrder, assertEqualsNoOrder, assertEqualsNoOrder, assertEqualsNoOrder, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEqualsDeep, assertNotEqualsDeep, assertNotEqualsDeep, assertNotEqualsDeep, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThrows, assertThrows, assertTrue, assertTrue, expectThrows, fail, fail, fail
-
Field Details
-
LOGGER
-
PAGE_LOAD_TIMEOUT
15 seconds- See Also:
-
TOMCAT_6
- See Also:
-
JETTY_7
- See Also:
-
SUBMIT
An XPath expression for locating a submit element (very commonly used withclickAndWait(String)
.- Since:
- 5.3
- See Also:
-
selenium
Deprecated.The underlyingSelenium
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.- Since:
- 5.3
-
webDriver
-
-
Constructor Details
-
SeleniumTestCase
public SeleniumTestCase()
-
-
Method Details
-
testStartup
@BeforeTest(dependsOnGroups="beforeStartup") public void testStartup(org.testng.ITestContext testContext, org.testng.xml.XmlTest xmlTest) throws Exception Starts up the servers for the entire test (i.e., for multiple TestCases). By placing <parameter> elements inside the appropriate <test> (of your testng.xml configuration file), you can change the configuration or behavior of the servers. It is common to have two or more identical tests that differ only in terms of thetapestry.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
orTOMCAT_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 Options and defaults ITestContext
to see if the necessary keys are already present).- Parameters:
testContext
- Used to share objects between the launcher and the test suites- Throws:
Exception
-
testShutdown
LiketestStartup(org.testng.ITestContext, org.testng.xml.XmlTest)
, this may be called multiple times against multiple instances, but only does work the first time. -
launchWebServer
protected Runnable launchWebServer(String container, String webAppFolder, String contextPath, int port, int sslPort) throws Exception Invoked fromtestStartup(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.- Parameters:
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 requests- Returns:
- Runnable used to shut down the server
- Throws:
Exception
-
setup
-
cleanup
-
writeErrorReport
Delegates toErrorReporter.writeErrorReport(String)
to capture the current page markup in a file for later analysis. -
getBaseURL
Returns the base URL for the application. This is of the typicallyhttp://localhost:9999/
(i.e., it includes a trailing slash). Generally, you should useopenLinks(String...)
to start from your application's home page. -
indicateTestMethodName
-
cleanupTestMethod
-
addCustomRequestHeader
- Specified by:
addCustomRequestHeader
in interfacecom.thoughtworks.selenium.Selenium
-
addLocationStrategy
- Specified by:
addLocationStrategy
in interfacecom.thoughtworks.selenium.Selenium
-
addScript
- Specified by:
addScript
in interfacecom.thoughtworks.selenium.Selenium
-
addSelection
- Specified by:
addSelection
in interfacecom.thoughtworks.selenium.Selenium
-
allowNativeXpath
- Specified by:
allowNativeXpath
in interfacecom.thoughtworks.selenium.Selenium
-
altKeyDown
- Specified by:
altKeyDown
in interfacecom.thoughtworks.selenium.Selenium
-
altKeyUp
- Specified by:
altKeyUp
in interfacecom.thoughtworks.selenium.Selenium
-
answerOnNextPrompt
- Specified by:
answerOnNextPrompt
in interfacecom.thoughtworks.selenium.Selenium
-
assignId
- Specified by:
assignId
in interfacecom.thoughtworks.selenium.Selenium
-
attachFile
- Specified by:
attachFile
in interfacecom.thoughtworks.selenium.Selenium
-
captureEntirePageScreenshot
- Specified by:
captureEntirePageScreenshot
in interfacecom.thoughtworks.selenium.Selenium
-
captureEntirePageScreenshotToString
- Specified by:
captureEntirePageScreenshotToString
in interfacecom.thoughtworks.selenium.Selenium
-
captureNetworkTraffic
- Specified by:
captureNetworkTraffic
in interfacecom.thoughtworks.selenium.Selenium
-
captureScreenshot
- Specified by:
captureScreenshot
in interfacecom.thoughtworks.selenium.Selenium
-
captureScreenshotToString
- Specified by:
captureScreenshotToString
in interfacecom.thoughtworks.selenium.Selenium
-
check
- Specified by:
check
in interfacecom.thoughtworks.selenium.Selenium
-
chooseCancelOnNextConfirmation
- Specified by:
chooseCancelOnNextConfirmation
in interfacecom.thoughtworks.selenium.Selenium
-
chooseOkOnNextConfirmation
- Specified by:
chooseOkOnNextConfirmation
in interfacecom.thoughtworks.selenium.Selenium
-
click
- Specified by:
click
in interfacecom.thoughtworks.selenium.Selenium
-
clickAt
- Specified by:
clickAt
in interfacecom.thoughtworks.selenium.Selenium
-
close
- Specified by:
close
in interfacecom.thoughtworks.selenium.Selenium
-
contextMenu
- Specified by:
contextMenu
in interfacecom.thoughtworks.selenium.Selenium
-
contextMenuAt
- Specified by:
contextMenuAt
in interfacecom.thoughtworks.selenium.Selenium
-
controlKeyDown
- Specified by:
controlKeyDown
in interfacecom.thoughtworks.selenium.Selenium
-
controlKeyUp
- Specified by:
controlKeyUp
in interfacecom.thoughtworks.selenium.Selenium
-
createCookie
- Specified by:
createCookie
in interfacecom.thoughtworks.selenium.Selenium
-
deleteAllVisibleCookies
- Specified by:
deleteAllVisibleCookies
in interfacecom.thoughtworks.selenium.Selenium
-
deleteCookie
- Specified by:
deleteCookie
in interfacecom.thoughtworks.selenium.Selenium
-
deselectPopUp
- Specified by:
deselectPopUp
in interfacecom.thoughtworks.selenium.Selenium
-
doubleClick
- Specified by:
doubleClick
in interfacecom.thoughtworks.selenium.Selenium
-
doubleClickAt
- Specified by:
doubleClickAt
in interfacecom.thoughtworks.selenium.Selenium
-
dragAndDrop
- Specified by:
dragAndDrop
in interfacecom.thoughtworks.selenium.Selenium
-
dragAndDropToObject
public void dragAndDropToObject(String locatorOfObjectToBeDragged, String locatorOfDragDestinationObject) - Specified by:
dragAndDropToObject
in interfacecom.thoughtworks.selenium.Selenium
-
dragdrop
- Specified by:
dragdrop
in interfacecom.thoughtworks.selenium.Selenium
-
fireEvent
- Specified by:
fireEvent
in interfacecom.thoughtworks.selenium.Selenium
-
focus
- Specified by:
focus
in interfacecom.thoughtworks.selenium.Selenium
-
getAlert
- Specified by:
getAlert
in interfacecom.thoughtworks.selenium.Selenium
-
getAllButtons
- Specified by:
getAllButtons
in interfacecom.thoughtworks.selenium.Selenium
-
getAllFields
- Specified by:
getAllFields
in interfacecom.thoughtworks.selenium.Selenium
-
getAllLinks
- Specified by:
getAllLinks
in interfacecom.thoughtworks.selenium.Selenium
-
getAllWindowIds
- Specified by:
getAllWindowIds
in interfacecom.thoughtworks.selenium.Selenium
-
getAllWindowNames
- Specified by:
getAllWindowNames
in interfacecom.thoughtworks.selenium.Selenium
-
getAllWindowTitles
- Specified by:
getAllWindowTitles
in interfacecom.thoughtworks.selenium.Selenium
-
getAttribute
- Specified by:
getAttribute
in interfacecom.thoughtworks.selenium.Selenium
-
getAttributeFromAllWindows
- Specified by:
getAttributeFromAllWindows
in interfacecom.thoughtworks.selenium.Selenium
-
getBodyText
- Specified by:
getBodyText
in interfacecom.thoughtworks.selenium.Selenium
-
getConfirmation
- Specified by:
getConfirmation
in interfacecom.thoughtworks.selenium.Selenium
-
getCookie
- Specified by:
getCookie
in interfacecom.thoughtworks.selenium.Selenium
-
getCookieByName
- Specified by:
getCookieByName
in interfacecom.thoughtworks.selenium.Selenium
-
getCursorPosition
- Specified by:
getCursorPosition
in interfacecom.thoughtworks.selenium.Selenium
-
getElementHeight
- Specified by:
getElementHeight
in interfacecom.thoughtworks.selenium.Selenium
-
getElementIndex
- Specified by:
getElementIndex
in interfacecom.thoughtworks.selenium.Selenium
-
getElementPositionLeft
- Specified by:
getElementPositionLeft
in interfacecom.thoughtworks.selenium.Selenium
-
getElementPositionTop
- Specified by:
getElementPositionTop
in interfacecom.thoughtworks.selenium.Selenium
-
getElementWidth
- Specified by:
getElementWidth
in interfacecom.thoughtworks.selenium.Selenium
-
getEval
- Specified by:
getEval
in interfacecom.thoughtworks.selenium.Selenium
-
getExpression
- Specified by:
getExpression
in interfacecom.thoughtworks.selenium.Selenium
-
getHtmlSource
- Specified by:
getHtmlSource
in interfacecom.thoughtworks.selenium.Selenium
-
getLocation
- Specified by:
getLocation
in interfacecom.thoughtworks.selenium.Selenium
-
getLog
- Specified by:
getLog
in interfacecom.thoughtworks.selenium.Selenium
-
getMouseSpeed
- Specified by:
getMouseSpeed
in interfacecom.thoughtworks.selenium.Selenium
-
getPrompt
- Specified by:
getPrompt
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectedId
- Specified by:
getSelectedId
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectedIds
- Specified by:
getSelectedIds
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectedIndex
- Specified by:
getSelectedIndex
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectedIndexes
- Specified by:
getSelectedIndexes
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectedLabel
- Specified by:
getSelectedLabel
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectedLabels
- Specified by:
getSelectedLabels
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectedValue
- Specified by:
getSelectedValue
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectedValues
- Specified by:
getSelectedValues
in interfacecom.thoughtworks.selenium.Selenium
-
getSelectOptions
- Specified by:
getSelectOptions
in interfacecom.thoughtworks.selenium.Selenium
-
getSpeed
- Specified by:
getSpeed
in interfacecom.thoughtworks.selenium.Selenium
-
getTable
- Specified by:
getTable
in interfacecom.thoughtworks.selenium.Selenium
-
getText
- Specified by:
getText
in interfacecom.thoughtworks.selenium.Selenium
-
getTitle
- Specified by:
getTitle
in interfacecom.thoughtworks.selenium.Selenium
-
getValue
- Specified by:
getValue
in interfacecom.thoughtworks.selenium.Selenium
-
getWhetherThisFrameMatchFrameExpression
- Specified by:
getWhetherThisFrameMatchFrameExpression
in interfacecom.thoughtworks.selenium.Selenium
-
getWhetherThisWindowMatchWindowExpression
- Specified by:
getWhetherThisWindowMatchWindowExpression
in interfacecom.thoughtworks.selenium.Selenium
-
getXpathCount
- Specified by:
getXpathCount
in interfacecom.thoughtworks.selenium.Selenium
-
goBack
- Specified by:
goBack
in interfacecom.thoughtworks.selenium.Selenium
-
highlight
- Specified by:
highlight
in interfacecom.thoughtworks.selenium.Selenium
-
ignoreAttributesWithoutValue
- Specified by:
ignoreAttributesWithoutValue
in interfacecom.thoughtworks.selenium.Selenium
-
isAlertPresent
- Specified by:
isAlertPresent
in interfacecom.thoughtworks.selenium.Selenium
-
isChecked
- Specified by:
isChecked
in interfacecom.thoughtworks.selenium.Selenium
-
isConfirmationPresent
- Specified by:
isConfirmationPresent
in interfacecom.thoughtworks.selenium.Selenium
-
isCookiePresent
- Specified by:
isCookiePresent
in interfacecom.thoughtworks.selenium.Selenium
-
isEditable
- Specified by:
isEditable
in interfacecom.thoughtworks.selenium.Selenium
-
isElementPresent
- Specified by:
isElementPresent
in interfacecom.thoughtworks.selenium.Selenium
-
isOrdered
- Specified by:
isOrdered
in interfacecom.thoughtworks.selenium.Selenium
-
isPromptPresent
- Specified by:
isPromptPresent
in interfacecom.thoughtworks.selenium.Selenium
-
isSomethingSelected
- Specified by:
isSomethingSelected
in interfacecom.thoughtworks.selenium.Selenium
-
isTextPresent
- Specified by:
isTextPresent
in interfacecom.thoughtworks.selenium.Selenium
-
isVisible
- Specified by:
isVisible
in interfacecom.thoughtworks.selenium.Selenium
-
keyDown
- Specified by:
keyDown
in interfacecom.thoughtworks.selenium.Selenium
-
keyDownNative
- Specified by:
keyDownNative
in interfacecom.thoughtworks.selenium.Selenium
-
keyPress
- Specified by:
keyPress
in interfacecom.thoughtworks.selenium.Selenium
-
keyPressNative
- Specified by:
keyPressNative
in interfacecom.thoughtworks.selenium.Selenium
-
keyUp
- Specified by:
keyUp
in interfacecom.thoughtworks.selenium.Selenium
-
keyUpNative
- Specified by:
keyUpNative
in interfacecom.thoughtworks.selenium.Selenium
-
metaKeyDown
- Specified by:
metaKeyDown
in interfacecom.thoughtworks.selenium.Selenium
-
metaKeyUp
- Specified by:
metaKeyUp
in interfacecom.thoughtworks.selenium.Selenium
-
mouseDown
- Specified by:
mouseDown
in interfacecom.thoughtworks.selenium.Selenium
-
mouseDownAt
- Specified by:
mouseDownAt
in interfacecom.thoughtworks.selenium.Selenium
-
mouseDownRight
- Specified by:
mouseDownRight
in interfacecom.thoughtworks.selenium.Selenium
-
mouseDownRightAt
- Specified by:
mouseDownRightAt
in interfacecom.thoughtworks.selenium.Selenium
-
mouseMove
- Specified by:
mouseMove
in interfacecom.thoughtworks.selenium.Selenium
-
mouseMoveAt
- Specified by:
mouseMoveAt
in interfacecom.thoughtworks.selenium.Selenium
-
mouseOut
- Specified by:
mouseOut
in interfacecom.thoughtworks.selenium.Selenium
-
mouseOver
- Specified by:
mouseOver
in interfacecom.thoughtworks.selenium.Selenium
-
mouseUp
- Specified by:
mouseUp
in interfacecom.thoughtworks.selenium.Selenium
-
mouseUpAt
- Specified by:
mouseUpAt
in interfacecom.thoughtworks.selenium.Selenium
-
mouseUpRight
- Specified by:
mouseUpRight
in interfacecom.thoughtworks.selenium.Selenium
-
mouseUpRightAt
- Specified by:
mouseUpRightAt
in interfacecom.thoughtworks.selenium.Selenium
-
open
- Specified by:
open
in interfacecom.thoughtworks.selenium.Selenium
-
open
- Specified by:
open
in interfacecom.thoughtworks.selenium.Selenium
-
openWindow
- Specified by:
openWindow
in interfacecom.thoughtworks.selenium.Selenium
-
refresh
- Specified by:
refresh
in interfacecom.thoughtworks.selenium.Selenium
-
removeAllSelections
- Specified by:
removeAllSelections
in interfacecom.thoughtworks.selenium.Selenium
-
removeScript
- Specified by:
removeScript
in interfacecom.thoughtworks.selenium.Selenium
-
removeSelection
- Specified by:
removeSelection
in interfacecom.thoughtworks.selenium.Selenium
-
retrieveLastRemoteControlLogs
- Specified by:
retrieveLastRemoteControlLogs
in interfacecom.thoughtworks.selenium.Selenium
-
rollup
- Specified by:
rollup
in interfacecom.thoughtworks.selenium.Selenium
-
runScript
- Specified by:
runScript
in interfacecom.thoughtworks.selenium.Selenium
-
select
- Specified by:
select
in interfacecom.thoughtworks.selenium.Selenium
-
selectFrame
- Specified by:
selectFrame
in interfacecom.thoughtworks.selenium.Selenium
-
selectPopUp
- Specified by:
selectPopUp
in interfacecom.thoughtworks.selenium.Selenium
-
selectWindow
- Specified by:
selectWindow
in interfacecom.thoughtworks.selenium.Selenium
-
setBrowserLogLevel
- Specified by:
setBrowserLogLevel
in interfacecom.thoughtworks.selenium.Selenium
-
setContext
- Specified by:
setContext
in interfacecom.thoughtworks.selenium.Selenium
-
setCursorPosition
- Specified by:
setCursorPosition
in interfacecom.thoughtworks.selenium.Selenium
-
setExtensionJs
- Specified by:
setExtensionJs
in interfacecom.thoughtworks.selenium.Selenium
-
setMouseSpeed
- Specified by:
setMouseSpeed
in interfacecom.thoughtworks.selenium.Selenium
-
setSpeed
- Specified by:
setSpeed
in interfacecom.thoughtworks.selenium.Selenium
-
setTimeout
- Specified by:
setTimeout
in interfacecom.thoughtworks.selenium.Selenium
-
shiftKeyDown
- Specified by:
shiftKeyDown
in interfacecom.thoughtworks.selenium.Selenium
-
shiftKeyUp
- Specified by:
shiftKeyUp
in interfacecom.thoughtworks.selenium.Selenium
-
showContextualBanner
- Specified by:
showContextualBanner
in interfacecom.thoughtworks.selenium.Selenium
-
showContextualBanner
- Specified by:
showContextualBanner
in interfacecom.thoughtworks.selenium.Selenium
-
shutDownSeleniumServer
- Specified by:
shutDownSeleniumServer
in interfacecom.thoughtworks.selenium.Selenium
-
start
- Specified by:
start
in interfacecom.thoughtworks.selenium.Selenium
-
start
- Specified by:
start
in interfacecom.thoughtworks.selenium.Selenium
-
start
- Specified by:
start
in interfacecom.thoughtworks.selenium.Selenium
-
stop
- Specified by:
stop
in interfacecom.thoughtworks.selenium.Selenium
-
submit
- Specified by:
submit
in interfacecom.thoughtworks.selenium.Selenium
-
type
- Specified by:
type
in interfacecom.thoughtworks.selenium.Selenium
-
typeKeys
- Specified by:
typeKeys
in interfacecom.thoughtworks.selenium.Selenium
-
uncheck
- Specified by:
uncheck
in interfacecom.thoughtworks.selenium.Selenium
-
useXpathLibrary
- Specified by:
useXpathLibrary
in interfacecom.thoughtworks.selenium.Selenium
-
waitForCondition
- Specified by:
waitForCondition
in interfacecom.thoughtworks.selenium.Selenium
-
waitForCondition
-
waitForCondition
protected void waitForCondition(org.openqa.selenium.support.ui.ExpectedCondition condition, long timeoutSeconds) -
waitForFrameToLoad
- Specified by:
waitForFrameToLoad
in interfacecom.thoughtworks.selenium.Selenium
-
waitForPageToLoad
Waits for page to load, then waits for initialization to finish, which is recognized by thedata-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)..- Specified by:
waitForPageToLoad
in interfacecom.thoughtworks.selenium.Selenium
-
waitForPopUp
- Specified by:
waitForPopUp
in interfacecom.thoughtworks.selenium.Selenium
-
windowFocus
- Specified by:
windowFocus
in interfacecom.thoughtworks.selenium.Selenium
-
windowMaximize
- Specified by:
windowMaximize
in interfacecom.thoughtworks.selenium.Selenium
-
scrollIntoView
-
reportAndThrowAssertionError
Formats a message from the provided arguments, which is written to System.err. In addition, captures the AUT's markup, screenshot, and a report to the output directory.- Parameters:
message
-arguments
-- Since:
- 5.4
-
unreachable
-
openBaseURL
Open the getBaseURL(), and waits for the page to load. -
assertText
Asserts the text of an element, identified by the locator.- Parameters:
locator
- identifies the element whose text value is to be assertedexpected
- expected value for the element's text
-
assertTextPresent
-
assertTextNotPresent
-
assertSourcePresent
Assets that each string provided is present somewhere in the current document.- Parameters:
expected
- string expected to be present
-
clickAndWait
Click a link identified by a locator, then wait for the resulting page to load. This is not useful for Ajax updates, just normal full-page refreshes.- Parameters:
locator
- identifies the link to click
-
waitForPageToLoad
Waits for the page to load (up to 15 seconds). This is invoked after clicking on an element that forces a full page refresh. -
assertAttribute
Used when the locator identifies an attribute, not an element.- Parameters:
locator
- identifies the attribute whose value is to be assertedexpected
- expected value for the attribute
-
assertFieldValue
Assets that the value in the field matches the expectation- Parameters:
locator
- identifies the fieldexpected
- expected value for the field- Since:
- 5.3
-
openLinks
Opens the base URL, then clicks through a series of links to get to a desired application state.- Since:
- 5.3
-
sleep
Sleeps for the indicated number of seconds.- Since:
- 5.3
-
waitForElementToAppear
Waits for the element with the given client-side id to be present in the DOM ( does not assure that the element is visible).- Parameters:
elementId
- identifies the element- Since:
- 5.3
-
waitForCssSelectorToAppear
Waits for an element with a given CSS selector to appear.- Parameters:
selector
- the CSS selector to wait.- Since:
- 5.5
-
waitForElementToDisappear
Deprecated.Deprecated in 5.4 with no replacementWaits for the element to be removed from the DOM. This implementation depends on window being extended with testSupport.isNotVisible().- Parameters:
elementId
- client-side id of element- Since:
- 5.3
-
waitForVisible
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. waitForVisible waits for an element that already exists in the dom to become visible.- Parameters:
selector
- element selector- Since:
- 5.3
-
waitForInvisible
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. waitForInvisible waits for an existing element to become invisible.- Parameters:
selector
- element selector- Since:
- 5.3
-
assertTitle
Asserts that the current page's title matches the expected value.- Parameters:
expected
- value for title- Since:
- 5.3
-
waitForAjaxRequestsToComplete
Deprecated.Deprecated in 5.4 in favor of the version without a timeoutWaits until all active XHR requests are completed.- Parameters:
timeout
- timeout to wait for (no longer used)- Since:
- 5.3
-
waitForAjaxRequestsToComplete
Waits until all active XHR requests (as noted by the t5/core/dom module) have completed.- Since:
- 5.4
-
getCssCount
- Specified by:
getCssCount
in interfacecom.thoughtworks.selenium.Selenium
-
convertLocator
-