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 Stringstatic final org.slf4j.Loggerstatic final String15 secondsprotected com.thoughtworks.selenium.SeleniumDeprecated.static final StringAn XPath expression for locating a submit element (very commonly used withclickAndWait(String).static final Stringprotected org.openqa.selenium.WebDriverFields inherited from class org.testng.Assert
ARRAY_MISMATCH_TEMPLATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomRequestHeader(String key, String value) voidaddLocationStrategy(String strategyName, String functionDefinition) voidvoidaddSelection(String locator, String optionLocator) voidallowNativeXpath(String allow) voidvoidaltKeyUp()voidanswerOnNextPrompt(String answer) protected final voidassertAttribute(String locator, String expected) Used when the locator identifies an attribute, not an element.protected final voidassertFieldValue(String locator, String expected) Assets that the value in the field matches the expectationprotected final voidassertSourcePresent(String... expected) Assets that each string provided is present somewhere in the current document.protected final voidassertText(String locator, String expected) Asserts the text of an element, identified by the locator.protected final voidassertTextNotPresent(String... text) protected final voidassertTextPresent(String... text) protected final voidassertTitle(String expected) Asserts that the current page's title matches the expected value.voidvoidattachFile(String fieldLocator, String fileLocator) voidcaptureEntirePageScreenshot(String filename, String kwargs) captureNetworkTraffic(String type) voidcaptureScreenshot(String filename) voidvoidvoidvoidcleanup()voidvoidprotected final voidclickAndWait(String locator) Click a link identified by a locator, then wait for the resulting page to load.voidvoidclose()voidcontextMenu(String locator) voidcontextMenuAt(String locator, String coordString) voidvoidprotected static org.openqa.selenium.ByconvertLocator(String locator) voidcreateCookie(String nameValuePair, String optionsString) voidvoiddeleteCookie(String name, String optionsString) voidvoiddoubleClick(String locator) voiddoubleClickAt(String locator, String coordString) voiddragAndDrop(String locator, String movementsString) voiddragAndDropToObject(String locatorOfObjectToBeDragged, String locatorOfDragDestinationObject) voidvoidvoidgetAlert()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()booleangetWhetherThisFrameMatchFrameExpression(String currentFrameString, String target) booleangetWhetherThisWindowMatchWindowExpression(String currentWindowString, String target) getXpathCount(String xpath) voidgoBack()voidvoidignoreAttributesWithoutValue(String ignore) voidindicateTestMethodName(Method testMethod) booleanbooleanbooleanbooleanisCookiePresent(String name) booleanisEditable(String locator) booleanisElementPresent(String locator) booleanbooleanbooleanisSomethingSelected(String selectLocator) booleanisTextPresent(String pattern) booleanvoidvoidkeyDownNative(String keycode) voidvoidkeyPressNative(String keycode) voidvoidkeyUpNative(String keycode) protected RunnablelaunchWebServer(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.voidvoidvoidvoidmouseDownAt(String locator, String coordString) voidmouseDownRight(String locator) voidmouseDownRightAt(String locator, String coordString) voidvoidmouseMoveAt(String locator, String coordString) voidvoidvoidvoidvoidmouseUpRight(String locator) voidmouseUpRightAt(String locator, String coordString) voidvoidprotected final voidOpen the getBaseURL(), and waits for the page to load.protected final voidOpens the base URL, then clicks through a series of links to get to a desired application state.voidopenWindow(String url, String windowID) voidrefresh()voidremoveAllSelections(String locator) voidremoveScript(String scriptTagId) voidremoveSelection(String locator, String optionLocator) protected final voidreportAndThrowAssertionError(String message, Object... arguments) Formats a message from the provided arguments, which is written to System.err.voidvoidvoidscrollIntoView(org.openqa.selenium.WebElement element) voidvoidselectFrame(String locator) voidselectPopUp(String windowID) voidselectWindow(String windowID) voidsetBrowserLogLevel(String logLevel) voidsetContext(String context) voidsetCursorPosition(String locator, String position) voidsetExtensionJs(String extensionJs) voidsetMouseSpeed(String pixels) voidvoidsetTimeout(String timeout) voidsetup(org.testng.ITestContext context) voidvoidvoidvoidshowContextualBanner(String className, String methodName) voidprotected final voidsleep(long millis) Sleeps for the indicated number of seconds.voidstart()voidvoidvoidstop()voidvoidtestShutdown(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.voidtestStartup(org.testng.ITestContext testContext, org.testng.xml.XmlTest xmlTest) Starts up the servers for the entire test (i.e., for multiple TestCases).voidvoidvoidprotected final voidvoiduseXpathLibrary(String libraryName) protected final voidWaits until all active XHR requests (as noted by the t5/core/dom module) have completed.protected final voidwaitForAjaxRequestsToComplete(String timeout) Deprecated.Deprecated in 5.4 in favor of the version without a timeoutvoidwaitForCondition(String script, String timeout) protected voidwaitForCondition(org.openqa.selenium.support.ui.ExpectedCondition condition) protected voidwaitForCondition(org.openqa.selenium.support.ui.ExpectedCondition condition, long timeoutSeconds) protected final voidwaitForCssSelectorToAppear(String selector) Waits for an element with a given CSS selector to appear.protected final voidwaitForElementToAppear(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 voidwaitForElementToDisappear(String elementId) Deprecated.Deprecated in 5.4 with no replacementvoidwaitForFrameToLoad(String frameAddress, String timeout) protected final voidwaitForInvisible(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 voidWaits for the page to load (up to 15 seconds).voidwaitForPageToLoad(String timeout) Waits for page to load, then waits for initialization to finish, which is recognized by thedata-page-initializedattribute being set to true on the body element.voidwaitForPopUp(String windowID, String timeout) protected final voidwaitForVisible(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.voidvoidprotected voidwriteErrorReport(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 underlyingSeleniuminstance 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-commandparameter, to run tests against multiple browsers.
Tests in the beforeStartup group will be run before the start of Selenium. This can be used to programmatically override the above parameter values. This method will be invoked in each subclass, but is set up to only startup the servers once (it checks theParameter Name Default Description container tapestry.servlet-container JETTY_7 The Servlet container to use for the tests. Currently JETTY_7orTOMCAT_6webAppFolder 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 ITestContextto 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:
addCustomRequestHeaderin interfacecom.thoughtworks.selenium.Selenium
-
addLocationStrategy
- Specified by:
addLocationStrategyin interfacecom.thoughtworks.selenium.Selenium
-
addScript
- Specified by:
addScriptin interfacecom.thoughtworks.selenium.Selenium
-
addSelection
- Specified by:
addSelectionin interfacecom.thoughtworks.selenium.Selenium
-
allowNativeXpath
- Specified by:
allowNativeXpathin interfacecom.thoughtworks.selenium.Selenium
-
altKeyDown
- Specified by:
altKeyDownin interfacecom.thoughtworks.selenium.Selenium
-
altKeyUp
- Specified by:
altKeyUpin interfacecom.thoughtworks.selenium.Selenium
-
answerOnNextPrompt
- Specified by:
answerOnNextPromptin interfacecom.thoughtworks.selenium.Selenium
-
assignId
- Specified by:
assignIdin interfacecom.thoughtworks.selenium.Selenium
-
attachFile
- Specified by:
attachFilein interfacecom.thoughtworks.selenium.Selenium
-
captureEntirePageScreenshot
- Specified by:
captureEntirePageScreenshotin interfacecom.thoughtworks.selenium.Selenium
-
captureEntirePageScreenshotToString
- Specified by:
captureEntirePageScreenshotToStringin interfacecom.thoughtworks.selenium.Selenium
-
captureNetworkTraffic
- Specified by:
captureNetworkTrafficin interfacecom.thoughtworks.selenium.Selenium
-
captureScreenshot
- Specified by:
captureScreenshotin interfacecom.thoughtworks.selenium.Selenium
-
captureScreenshotToString
- Specified by:
captureScreenshotToStringin interfacecom.thoughtworks.selenium.Selenium
-
check
- Specified by:
checkin interfacecom.thoughtworks.selenium.Selenium
-
chooseCancelOnNextConfirmation
- Specified by:
chooseCancelOnNextConfirmationin interfacecom.thoughtworks.selenium.Selenium
-
chooseOkOnNextConfirmation
- Specified by:
chooseOkOnNextConfirmationin interfacecom.thoughtworks.selenium.Selenium
-
click
- Specified by:
clickin interfacecom.thoughtworks.selenium.Selenium
-
clickAt
- Specified by:
clickAtin interfacecom.thoughtworks.selenium.Selenium
-
close
- Specified by:
closein interfacecom.thoughtworks.selenium.Selenium
-
contextMenu
- Specified by:
contextMenuin interfacecom.thoughtworks.selenium.Selenium
-
contextMenuAt
- Specified by:
contextMenuAtin interfacecom.thoughtworks.selenium.Selenium
-
controlKeyDown
- Specified by:
controlKeyDownin interfacecom.thoughtworks.selenium.Selenium
-
controlKeyUp
- Specified by:
controlKeyUpin interfacecom.thoughtworks.selenium.Selenium
-
createCookie
- Specified by:
createCookiein interfacecom.thoughtworks.selenium.Selenium
-
deleteAllVisibleCookies
- Specified by:
deleteAllVisibleCookiesin interfacecom.thoughtworks.selenium.Selenium
-
deleteCookie
- Specified by:
deleteCookiein interfacecom.thoughtworks.selenium.Selenium
-
deselectPopUp
- Specified by:
deselectPopUpin interfacecom.thoughtworks.selenium.Selenium
-
doubleClick
- Specified by:
doubleClickin interfacecom.thoughtworks.selenium.Selenium
-
doubleClickAt
- Specified by:
doubleClickAtin interfacecom.thoughtworks.selenium.Selenium
-
dragAndDrop
- Specified by:
dragAndDropin interfacecom.thoughtworks.selenium.Selenium
-
dragAndDropToObject
public void dragAndDropToObject(String locatorOfObjectToBeDragged, String locatorOfDragDestinationObject) - Specified by:
dragAndDropToObjectin interfacecom.thoughtworks.selenium.Selenium
-
dragdrop
- Specified by:
dragdropin interfacecom.thoughtworks.selenium.Selenium
-
fireEvent
- Specified by:
fireEventin interfacecom.thoughtworks.selenium.Selenium
-
focus
- Specified by:
focusin interfacecom.thoughtworks.selenium.Selenium
-
getAlert
- Specified by:
getAlertin interfacecom.thoughtworks.selenium.Selenium
-
getAllButtons
- Specified by:
getAllButtonsin interfacecom.thoughtworks.selenium.Selenium
-
getAllFields
- Specified by:
getAllFieldsin interfacecom.thoughtworks.selenium.Selenium
-
getAllLinks
- Specified by:
getAllLinksin interfacecom.thoughtworks.selenium.Selenium
-
getAllWindowIds
- Specified by:
getAllWindowIdsin interfacecom.thoughtworks.selenium.Selenium
-
getAllWindowNames
- Specified by:
getAllWindowNamesin interfacecom.thoughtworks.selenium.Selenium
-
getAllWindowTitles
- Specified by:
getAllWindowTitlesin interfacecom.thoughtworks.selenium.Selenium
-
getAttribute
- Specified by:
getAttributein interfacecom.thoughtworks.selenium.Selenium
-
getAttributeFromAllWindows
- Specified by:
getAttributeFromAllWindowsin interfacecom.thoughtworks.selenium.Selenium
-
getBodyText
- Specified by:
getBodyTextin interfacecom.thoughtworks.selenium.Selenium
-
getConfirmation
- Specified by:
getConfirmationin interfacecom.thoughtworks.selenium.Selenium
-
getCookie
- Specified by:
getCookiein interfacecom.thoughtworks.selenium.Selenium
-
getCookieByName
- Specified by:
getCookieByNamein interfacecom.thoughtworks.selenium.Selenium
-
getCursorPosition
- Specified by:
getCursorPositionin interfacecom.thoughtworks.selenium.Selenium
-
getElementHeight
- Specified by:
getElementHeightin interfacecom.thoughtworks.selenium.Selenium
-
getElementIndex
- Specified by:
getElementIndexin interfacecom.thoughtworks.selenium.Selenium
-
getElementPositionLeft
- Specified by:
getElementPositionLeftin interfacecom.thoughtworks.selenium.Selenium
-
getElementPositionTop
- Specified by:
getElementPositionTopin interfacecom.thoughtworks.selenium.Selenium
-
getElementWidth
- Specified by:
getElementWidthin interfacecom.thoughtworks.selenium.Selenium
-
getEval
- Specified by:
getEvalin interfacecom.thoughtworks.selenium.Selenium
-
getExpression
- Specified by:
getExpressionin interfacecom.thoughtworks.selenium.Selenium
-
getHtmlSource
- Specified by:
getHtmlSourcein interfacecom.thoughtworks.selenium.Selenium
-
getLocation
- Specified by:
getLocationin interfacecom.thoughtworks.selenium.Selenium
-
getLog
- Specified by:
getLogin interfacecom.thoughtworks.selenium.Selenium
-
getMouseSpeed
- Specified by:
getMouseSpeedin interfacecom.thoughtworks.selenium.Selenium
-
getPrompt
- Specified by:
getPromptin interfacecom.thoughtworks.selenium.Selenium
-
getSelectedId
- Specified by:
getSelectedIdin interfacecom.thoughtworks.selenium.Selenium
-
getSelectedIds
- Specified by:
getSelectedIdsin interfacecom.thoughtworks.selenium.Selenium
-
getSelectedIndex
- Specified by:
getSelectedIndexin interfacecom.thoughtworks.selenium.Selenium
-
getSelectedIndexes
- Specified by:
getSelectedIndexesin interfacecom.thoughtworks.selenium.Selenium
-
getSelectedLabel
- Specified by:
getSelectedLabelin interfacecom.thoughtworks.selenium.Selenium
-
getSelectedLabels
- Specified by:
getSelectedLabelsin interfacecom.thoughtworks.selenium.Selenium
-
getSelectedValue
- Specified by:
getSelectedValuein interfacecom.thoughtworks.selenium.Selenium
-
getSelectedValues
- Specified by:
getSelectedValuesin interfacecom.thoughtworks.selenium.Selenium
-
getSelectOptions
- Specified by:
getSelectOptionsin interfacecom.thoughtworks.selenium.Selenium
-
getSpeed
- Specified by:
getSpeedin interfacecom.thoughtworks.selenium.Selenium
-
getTable
- Specified by:
getTablein interfacecom.thoughtworks.selenium.Selenium
-
getText
- Specified by:
getTextin interfacecom.thoughtworks.selenium.Selenium
-
getTitle
- Specified by:
getTitlein interfacecom.thoughtworks.selenium.Selenium
-
getValue
- Specified by:
getValuein interfacecom.thoughtworks.selenium.Selenium
-
getWhetherThisFrameMatchFrameExpression
- Specified by:
getWhetherThisFrameMatchFrameExpressionin interfacecom.thoughtworks.selenium.Selenium
-
getWhetherThisWindowMatchWindowExpression
- Specified by:
getWhetherThisWindowMatchWindowExpressionin interfacecom.thoughtworks.selenium.Selenium
-
getXpathCount
- Specified by:
getXpathCountin interfacecom.thoughtworks.selenium.Selenium
-
goBack
- Specified by:
goBackin interfacecom.thoughtworks.selenium.Selenium
-
highlight
- Specified by:
highlightin interfacecom.thoughtworks.selenium.Selenium
-
ignoreAttributesWithoutValue
- Specified by:
ignoreAttributesWithoutValuein interfacecom.thoughtworks.selenium.Selenium
-
isAlertPresent
- Specified by:
isAlertPresentin interfacecom.thoughtworks.selenium.Selenium
-
isChecked
- Specified by:
isCheckedin interfacecom.thoughtworks.selenium.Selenium
-
isConfirmationPresent
- Specified by:
isConfirmationPresentin interfacecom.thoughtworks.selenium.Selenium
-
isCookiePresent
- Specified by:
isCookiePresentin interfacecom.thoughtworks.selenium.Selenium
-
isEditable
- Specified by:
isEditablein interfacecom.thoughtworks.selenium.Selenium
-
isElementPresent
- Specified by:
isElementPresentin interfacecom.thoughtworks.selenium.Selenium
-
isOrdered
- Specified by:
isOrderedin interfacecom.thoughtworks.selenium.Selenium
-
isPromptPresent
- Specified by:
isPromptPresentin interfacecom.thoughtworks.selenium.Selenium
-
isSomethingSelected
- Specified by:
isSomethingSelectedin interfacecom.thoughtworks.selenium.Selenium
-
isTextPresent
- Specified by:
isTextPresentin interfacecom.thoughtworks.selenium.Selenium
-
isVisible
- Specified by:
isVisiblein interfacecom.thoughtworks.selenium.Selenium
-
keyDown
- Specified by:
keyDownin interfacecom.thoughtworks.selenium.Selenium
-
keyDownNative
- Specified by:
keyDownNativein interfacecom.thoughtworks.selenium.Selenium
-
keyPress
- Specified by:
keyPressin interfacecom.thoughtworks.selenium.Selenium
-
keyPressNative
- Specified by:
keyPressNativein interfacecom.thoughtworks.selenium.Selenium
-
keyUp
- Specified by:
keyUpin interfacecom.thoughtworks.selenium.Selenium
-
keyUpNative
- Specified by:
keyUpNativein interfacecom.thoughtworks.selenium.Selenium
-
metaKeyDown
- Specified by:
metaKeyDownin interfacecom.thoughtworks.selenium.Selenium
-
metaKeyUp
- Specified by:
metaKeyUpin interfacecom.thoughtworks.selenium.Selenium
-
mouseDown
- Specified by:
mouseDownin interfacecom.thoughtworks.selenium.Selenium
-
mouseDownAt
- Specified by:
mouseDownAtin interfacecom.thoughtworks.selenium.Selenium
-
mouseDownRight
- Specified by:
mouseDownRightin interfacecom.thoughtworks.selenium.Selenium
-
mouseDownRightAt
- Specified by:
mouseDownRightAtin interfacecom.thoughtworks.selenium.Selenium
-
mouseMove
- Specified by:
mouseMovein interfacecom.thoughtworks.selenium.Selenium
-
mouseMoveAt
- Specified by:
mouseMoveAtin interfacecom.thoughtworks.selenium.Selenium
-
mouseOut
- Specified by:
mouseOutin interfacecom.thoughtworks.selenium.Selenium
-
mouseOver
- Specified by:
mouseOverin interfacecom.thoughtworks.selenium.Selenium
-
mouseUp
- Specified by:
mouseUpin interfacecom.thoughtworks.selenium.Selenium
-
mouseUpAt
- Specified by:
mouseUpAtin interfacecom.thoughtworks.selenium.Selenium
-
mouseUpRight
- Specified by:
mouseUpRightin interfacecom.thoughtworks.selenium.Selenium
-
mouseUpRightAt
- Specified by:
mouseUpRightAtin interfacecom.thoughtworks.selenium.Selenium
-
open
- Specified by:
openin interfacecom.thoughtworks.selenium.Selenium
-
open
- Specified by:
openin interfacecom.thoughtworks.selenium.Selenium
-
openWindow
- Specified by:
openWindowin interfacecom.thoughtworks.selenium.Selenium
-
refresh
- Specified by:
refreshin interfacecom.thoughtworks.selenium.Selenium
-
removeAllSelections
- Specified by:
removeAllSelectionsin interfacecom.thoughtworks.selenium.Selenium
-
removeScript
- Specified by:
removeScriptin interfacecom.thoughtworks.selenium.Selenium
-
removeSelection
- Specified by:
removeSelectionin interfacecom.thoughtworks.selenium.Selenium
-
retrieveLastRemoteControlLogs
- Specified by:
retrieveLastRemoteControlLogsin interfacecom.thoughtworks.selenium.Selenium
-
rollup
- Specified by:
rollupin interfacecom.thoughtworks.selenium.Selenium
-
runScript
- Specified by:
runScriptin interfacecom.thoughtworks.selenium.Selenium
-
select
- Specified by:
selectin interfacecom.thoughtworks.selenium.Selenium
-
selectFrame
- Specified by:
selectFramein interfacecom.thoughtworks.selenium.Selenium
-
selectPopUp
- Specified by:
selectPopUpin interfacecom.thoughtworks.selenium.Selenium
-
selectWindow
- Specified by:
selectWindowin interfacecom.thoughtworks.selenium.Selenium
-
setBrowserLogLevel
- Specified by:
setBrowserLogLevelin interfacecom.thoughtworks.selenium.Selenium
-
setContext
- Specified by:
setContextin interfacecom.thoughtworks.selenium.Selenium
-
setCursorPosition
- Specified by:
setCursorPositionin interfacecom.thoughtworks.selenium.Selenium
-
setExtensionJs
- Specified by:
setExtensionJsin interfacecom.thoughtworks.selenium.Selenium
-
setMouseSpeed
- Specified by:
setMouseSpeedin interfacecom.thoughtworks.selenium.Selenium
-
setSpeed
- Specified by:
setSpeedin interfacecom.thoughtworks.selenium.Selenium
-
setTimeout
- Specified by:
setTimeoutin interfacecom.thoughtworks.selenium.Selenium
-
shiftKeyDown
- Specified by:
shiftKeyDownin interfacecom.thoughtworks.selenium.Selenium
-
shiftKeyUp
- Specified by:
shiftKeyUpin interfacecom.thoughtworks.selenium.Selenium
-
showContextualBanner
- Specified by:
showContextualBannerin interfacecom.thoughtworks.selenium.Selenium
-
showContextualBanner
- Specified by:
showContextualBannerin interfacecom.thoughtworks.selenium.Selenium
-
shutDownSeleniumServer
- Specified by:
shutDownSeleniumServerin interfacecom.thoughtworks.selenium.Selenium
-
start
- Specified by:
startin interfacecom.thoughtworks.selenium.Selenium
-
start
- Specified by:
startin interfacecom.thoughtworks.selenium.Selenium
-
start
- Specified by:
startin interfacecom.thoughtworks.selenium.Selenium
-
stop
- Specified by:
stopin interfacecom.thoughtworks.selenium.Selenium
-
submit
- Specified by:
submitin interfacecom.thoughtworks.selenium.Selenium
-
type
- Specified by:
typein interfacecom.thoughtworks.selenium.Selenium
-
typeKeys
- Specified by:
typeKeysin interfacecom.thoughtworks.selenium.Selenium
-
uncheck
- Specified by:
uncheckin interfacecom.thoughtworks.selenium.Selenium
-
useXpathLibrary
- Specified by:
useXpathLibraryin interfacecom.thoughtworks.selenium.Selenium
-
waitForCondition
- Specified by:
waitForConditionin interfacecom.thoughtworks.selenium.Selenium
-
waitForCondition
-
waitForCondition
protected void waitForCondition(org.openqa.selenium.support.ui.ExpectedCondition condition, long timeoutSeconds) -
waitForFrameToLoad
- Specified by:
waitForFrameToLoadin interfacecom.thoughtworks.selenium.Selenium
-
waitForPageToLoad
Waits for page to load, then waits for initialization to finish, which is recognized by thedata-page-initializedattribute 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:
waitForPageToLoadin interfacecom.thoughtworks.selenium.Selenium
-
waitForPopUp
- Specified by:
waitForPopUpin interfacecom.thoughtworks.selenium.Selenium
-
windowFocus
- Specified by:
windowFocusin interfacecom.thoughtworks.selenium.Selenium
-
windowMaximize
- Specified by:
windowMaximizein 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:
getCssCountin interfacecom.thoughtworks.selenium.Selenium
-
convertLocator
-