|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.selenium.mock.MockSeleniumClient
public class MockSeleniumClient
Mock implementation of the SeleniumClient interface.
Probably the longest mock-that-does-nothing in the history of software.
| Constructor Summary | |
|---|---|
MockSeleniumClient()
|
|
| Method Summary | |
|---|---|
void |
addCustomRequestHeader(String s,
String s1)
|
void |
addLocationStrategy(String s,
String s1)
|
MockSeleniumClient |
addPresentElements(String... elements)
|
void |
addScript(String s,
String s1)
|
MockSeleniumClient |
addScriptResult(String script,
String result)
|
void |
addSelection(String s,
String s1)
|
void |
allowNativeXpath(String s)
|
void |
altKeyDown()
|
void |
altKeyUp()
|
void |
answerOnNextPrompt(String s)
|
void |
assignId(String s,
String s1)
|
void |
attachFile(String s,
String s1)
|
void |
captureEntirePageScreenshot(String filePath)
|
void |
captureEntirePageScreenshot(String s,
String s1)
|
String |
captureEntirePageScreenshotToString(String s)
|
String |
captureNetworkTraffic(String s)
|
void |
captureScreenshot(String s)
|
String |
captureScreenshotToString()
|
void |
check(String s)
|
void |
check(String name,
String value)
Checks a checkbox given a name and value. |
void |
chooseCancelOnNextConfirmation()
|
void |
chooseOkOnNextConfirmation()
|
void |
click(String s)
|
void |
click(String locator,
boolean waitForPageToLoad)
Click the element with the given locator and optionally wait for the page to load, using #PAGE_LOAD_WAIT. |
void |
click(String locator,
long timeoutMillis)
Click the element with the given locator and wait for the page to load, for a maximum of timeoutMillis. |
void |
clickAndWaitForAjaxWithJquery(String locator)
Click the element with the given locator and wait for the ajax call to finish. |
void |
clickAndWaitForAjaxWithJquery(String locator,
long timeoutMillis)
Click the element with the given locator and wait for the ajax call to finish. |
void |
clickAt(String s,
String s1)
|
void |
clickButton(String buttonText,
boolean waitForPageToLoad)
|
void |
clickButtonAndWaitForAjaxWithJquery(String buttonText)
|
void |
clickButtonWithName(String buttonName,
boolean waitForPageToLoad)
|
void |
clickButtonWithNameAndWaitForAjaxWithJquery(String buttonName)
|
void |
clickElementWithClass(String className)
|
void |
clickElementWithClassAndWaitForAjaxWithJquery(String className)
|
void |
clickElementWithCss(String cssSelector)
|
void |
clickElementWithCssAndWaitForAjaxWithJquery(String cssSelector)
|
void |
clickElementWithTitle(String title)
|
void |
clickElementWithTitleAndWaitForAjaxWithJquery(String title)
|
void |
clickElementWithXpath(String xpath)
|
void |
clickElementWithXpathAndWaitForAjaxWithJquery(String xpath)
|
void |
clickLinkWithText(String text,
boolean waitForPageToLoad)
|
void |
close()
|
void |
contextMenu(String s)
|
void |
contextMenuAt(String s,
String s1)
|
void |
controlKeyDown()
|
void |
controlKeyUp()
|
void |
createCookie(String s,
String s1)
|
void |
deleteAllVisibleCookies()
|
void |
deleteCookie(String s,
String s1)
|
void |
deselectPopUp()
|
void |
doubleClick(String s)
|
void |
doubleClickAt(String s,
String s1)
|
void |
dragAndDrop(String s,
String s1)
|
void |
dragAndDropToObject(String s,
String s1)
|
void |
dragdrop(String s,
String s1)
|
void |
evaluate(String command)
Execute a script in the client. |
Object |
execute(String command,
Object... arguments)
Execute a script in the client and return the evaluated result. |
List<String> |
executedScripts()
|
void |
fireEvent(String s,
String s1)
|
void |
focus(String s)
|
void |
generateKeyEvent(String locator,
KeyEventType eventType,
int keyCode,
int characterCode,
boolean shiftKey,
boolean altKey,
boolean controlKey,
boolean metaKey)
This is a low level function to generate one keyboard event. |
MockSeleniumClient |
genericScriptResult(String result)
|
String |
getAlert()
|
String[] |
getAllButtons()
|
String[] |
getAllFields()
|
String[] |
getAllLinks()
|
String[] |
getAllWindowIds()
|
String[] |
getAllWindowNames()
|
String[] |
getAllWindowTitles()
|
String |
getAttribute(String s)
|
String[] |
getAttributeFromAllWindows(String s)
|
String |
getBodyText()
|
Browser |
getBrowser()
|
String |
getConfirmation()
|
String |
getCookie()
|
String |
getCookieByName(String s)
|
Number |
getCssCount(String css)
|
Number |
getCursorPosition(String s)
|
ScreenElement |
getElementAtPoint(int x,
int y)
|
Number |
getElementHeight(String s)
|
Number |
getElementIndex(String s)
|
Number |
getElementPositionLeft(String s)
|
Number |
getElementPositionTop(String s)
|
Number |
getElementWidth(String s)
|
String |
getEval(String script)
|
String |
getExpression(String s)
|
String |
getHtmlSource()
|
String |
getLocation()
|
String |
getLog()
|
Number |
getMouseSpeed()
|
String |
getPrompt()
|
String |
getSelectedId(String s)
|
String[] |
getSelectedIds(String s)
|
String |
getSelectedIndex(String s)
|
String[] |
getSelectedIndexes(String s)
|
String |
getSelectedLabel(String s)
|
String[] |
getSelectedLabels(String s)
|
String |
getSelectedValue(String s)
|
String[] |
getSelectedValues(String s)
|
String[] |
getSelectOptions(String s)
|
String |
getSpeed()
|
String |
getTable(String s)
|
String |
getText(String s)
|
String |
getTitle()
|
String |
getValue(String s)
|
boolean |
getWhetherThisFrameMatchFrameExpression(String s,
String s1)
|
boolean |
getWhetherThisWindowMatchWindowExpression(String s,
String s1)
|
Number |
getXpathCount(String s)
|
void |
goBack()
|
boolean |
hasJquery()
|
void |
highlight(String s)
|
void |
ignoreAttributesWithoutValue(String s)
|
boolean |
isAlertPresent()
|
boolean |
isChecked(String s)
|
boolean |
isConfirmationPresent()
|
boolean |
isCookiePresent(String s)
|
boolean |
isEditable(String s)
|
boolean |
isElementPresent(String elemLocator)
|
boolean |
isOrdered(String s,
String s1)
|
boolean |
isPromptPresent()
|
boolean |
isSomethingSelected(String s)
|
boolean |
isTextPresent(String s)
|
boolean |
isVisible(String s)
|
void |
keyDown(String s,
String s1)
|
void |
keyDownNative(String s)
|
void |
keyPress(String locator,
String key)
This will type into a field by sending key down / key press / key up events. |
void |
keyPressNative(String s)
|
void |
keyUp(String s,
String s1)
|
void |
keyUpNative(String s)
|
void |
metaKeyDown()
|
void |
metaKeyUp()
|
void |
mouseDown(String s)
|
void |
mouseDownAt(String s,
String s1)
|
void |
mouseDownRight(String s)
|
void |
mouseDownRightAt(String s,
String s1)
|
void |
mouseMove(String s)
|
void |
mouseMoveAt(String s,
String s1)
|
void |
mouseOut(String s)
|
void |
mouseOver(String s)
|
void |
mouseUp(String s)
|
void |
mouseUpAt(String s,
String s1)
|
void |
mouseUpRight(String s)
|
void |
mouseUpRightAt(String s,
String s1)
|
void |
open(String url)
Unlike DefaultSelenium#open, this opens the provided URL relative to the application context path. |
void |
open(String url,
long timeoutMillis)
Opens the given URL and waits a maximum of timeoutMillis for the page to load completely. |
void |
open(String s,
String s1)
|
void |
openNoWait(String url)
Wait for page to load doesn't work the case of non-HTML based resources (like images). |
void |
openWindow(String s,
String s1)
|
void |
refresh()
|
void |
refreshAndWait()
|
void |
removeAllSelections(String s)
|
void |
removeScript(String s)
|
void |
removeSelection(String s,
String s1)
|
boolean |
resizeScreen(ScreenResolution resolution,
boolean refreshAfterResize)
|
String |
retrieveLastRemoteControlLogs()
|
void |
rollup(String s,
String s1)
|
void |
runScript(String s)
|
void |
select(String s,
String s1)
|
void |
selectFrame(String s)
|
void |
selectOption(String selectName,
String label)
This will select an option from a select field. |
void |
selectOptionAndWaitForAjaxWithJquery(String selectName,
String label)
This will select an option from a select field. |
void |
selectPopUp(String s)
|
void |
selectWindow(String s)
|
void |
seleniumKeyPress(String locator,
String key)
|
void |
setBrowserLogLevel(String s)
|
void |
setContext(String s)
|
void |
setCursorPosition(String s,
String s1)
|
void |
setExtensionJs(String s)
|
void |
setMouseSpeed(String s)
|
void |
setSpeed(String s)
|
void |
setTimeout(String s)
|
void |
shiftKeyDown()
|
void |
shiftKeyUp()
|
void |
showContextualBanner()
|
void |
showContextualBanner(String s,
String s1)
|
void |
shutDownSeleniumServer()
|
void |
simulateKeyPressForCharacter(String s,
Character character)
This will send all the events for a particular character NOTE: This function will only handle vanilla ascii characters more exotic characters will be ignored (ie. |
void |
simulateKeyPressForCharacter(String locator,
Character character,
Collection<KeyEventType> eventsToFire)
This will send all the events for a particular character NOTE: This function will only handle vanilla ascii characters more exotic characters will be ignored (ie. |
void |
simulateKeyPressForSpecialKey(String s,
int i)
This will send all the events for a particular special key (for example F1 or the down arrow key) The keyCode matches the codes in java.awt.event.KeyEvent NOTE: the return key actually fires events with a keyCode of 13 NOT VK_ENTER This will fire ALL events for the special key. |
void |
simulateKeyPressForSpecialKey(String locator,
int keyCode,
Collection<KeyEventType> eventsToFire)
This will send all the events for a particular special key (for example F1 or the down arrow key) The keyCode matches the codes in java.awt.event.KeyEvent NOTE: the return key actually fires events with a keyCode of 13 NOT VK_ENTER * |
void |
start()
|
void |
start(Object o)
|
void |
start(String s)
|
void |
stop()
|
void |
submit(String s)
|
void |
submit(String form,
boolean waitForPageToLoad)
Submit the named form locator and optionally wait for the page to load, using #PAGE_LOAD_WAIT. |
void |
submit(String form,
long timeoutMillis)
Submit the given form and wait for the page to load, for a maximum of timeoutMillis. |
void |
toggleToCharacterCode(boolean b)
This sets if subsiquent calls to the keyEvent (@keyDown, @keyPress, @keyUp) fuctions will set the code in the characterCode or not. |
void |
toggleToKeyCode(boolean b)
This sets if subsiquent calls to the keyEvent (@keyDown, @keyPress, @keyUp) fuctions will set the code in the keyCode or not. |
void |
type(String s,
String s1)
|
void |
typeInElementWithCss(String cssSelector,
String text)
|
void |
typeInElementWithName(String elementName,
String text)
|
void |
typeKeys(String s,
String s1)
|
void |
typeWithFullKeyEvents(String locator,
String string)
This will type into a field by first blanking it out and then sending key down / key press / key up events. |
void |
typeWithFullKeyEvents(String locator,
String string,
boolean reset)
This will type into a field by first blanking it out and then sending key down / key press / key up events. |
void |
uncheck(String s)
|
void |
useXpathLibrary(String s)
|
void |
waitForAjaxWithJquery()
Waits for the page to finish loading ajax calls, and returns if there are no more ajax calls currently running. |
void |
waitForAjaxWithJquery(long timeoutMillis)
Waits for the page to finish loading ajax calls, and returns if there are no more ajax calls currently running. |
void |
waitForCondition(String javascript)
Executes the given Javascript in the context of the text page and waits for it to evaluate to true for a maximum of SeleniumConfiguration.getActionWait milliseconds. |
void |
waitForCondition(String javascript,
long timeoutMillis)
Executes the given Javascript in the context of the text page and waits for it to evaluate to true for a maximum of timeoutMillis. |
void |
waitForCondition(String s,
String s1)
|
void |
waitForFrameToLoad(String s,
String s1)
|
boolean |
waitForJQuery(long waitTimeMillis)
Wait until all active jQuery AJAX queries have returned -- i.e., no AJAX queries are active. |
void |
waitForPageToLoad()
Waits for the page to load with the default timeout configured in SeleniumConfiguration. |
void |
waitForPageToLoad(long timeoutMillis)
Overloads Selenium.waitForPageToLoad(String) to take in a long. |
void |
waitForPageToLoad(String s)
|
void |
waitForPopUp(String s,
String s1)
|
void |
windowFocus()
|
void |
windowMaximize()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockSeleniumClient()
| Method Detail |
|---|
public void open(String url)
SeleniumClientDefaultSelenium#open, this opens the provided URL relative to the application context path.
It also waits for the page to load -- a maximum of PAGE_LOAD_WAIT before returning.
open in interface SeleniumClientopen in interface com.thoughtworks.selenium.Selenium
public void openWindow(String s,
String s1)
openWindow in interface com.thoughtworks.selenium.Seleniumpublic void selectWindow(String s)
selectWindow in interface com.thoughtworks.selenium.Seleniumpublic void selectPopUp(String s)
selectPopUp in interface com.thoughtworks.selenium.Seleniumpublic void deselectPopUp()
deselectPopUp in interface com.thoughtworks.selenium.Seleniumpublic void selectFrame(String s)
selectFrame in interface com.thoughtworks.selenium.Selenium
public boolean getWhetherThisFrameMatchFrameExpression(String s,
String s1)
getWhetherThisFrameMatchFrameExpression in interface com.thoughtworks.selenium.Selenium
public boolean getWhetherThisWindowMatchWindowExpression(String s,
String s1)
getWhetherThisWindowMatchWindowExpression in interface com.thoughtworks.selenium.Selenium
public void waitForPopUp(String s,
String s1)
waitForPopUp 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 answerOnNextPrompt(String s)
answerOnNextPrompt in interface com.thoughtworks.selenium.Seleniumpublic void goBack()
goBack in interface com.thoughtworks.selenium.Seleniumpublic void refresh()
refresh in interface com.thoughtworks.selenium.Seleniumpublic void close()
close in interface com.thoughtworks.selenium.Seleniumpublic boolean isAlertPresent()
isAlertPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isPromptPresent()
isPromptPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isConfirmationPresent()
isConfirmationPresent in interface com.thoughtworks.selenium.Seleniumpublic String getAlert()
getAlert in interface com.thoughtworks.selenium.Seleniumpublic String getConfirmation()
getConfirmation in interface com.thoughtworks.selenium.Seleniumpublic String getPrompt()
getPrompt in interface com.thoughtworks.selenium.Seleniumpublic String getLocation()
getLocation in interface com.thoughtworks.selenium.Seleniumpublic String getTitle()
getTitle in interface com.thoughtworks.selenium.Seleniumpublic String getBodyText()
getBodyText in interface com.thoughtworks.selenium.Seleniumpublic String getValue(String s)
getValue in interface com.thoughtworks.selenium.Seleniumpublic String getText(String s)
getText in interface com.thoughtworks.selenium.Seleniumpublic void highlight(String s)
highlight in interface com.thoughtworks.selenium.Seleniumpublic String getEval(String script)
getEval in interface com.thoughtworks.selenium.Selenium
public MockSeleniumClient addScriptResult(String script,
String result)
public MockSeleniumClient genericScriptResult(String result)
public List<String> executedScripts()
public boolean isChecked(String s)
isChecked in interface com.thoughtworks.selenium.Seleniumpublic String getTable(String s)
getTable in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedLabels(String s)
getSelectedLabels in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedLabel(String s)
getSelectedLabel in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedValues(String s)
getSelectedValues in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedValue(String s)
getSelectedValue in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedIndexes(String s)
getSelectedIndexes in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedIndex(String s)
getSelectedIndex in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectedIds(String s)
getSelectedIds in interface com.thoughtworks.selenium.Seleniumpublic String getSelectedId(String s)
getSelectedId in interface com.thoughtworks.selenium.Seleniumpublic boolean isSomethingSelected(String s)
isSomethingSelected in interface com.thoughtworks.selenium.Seleniumpublic String[] getSelectOptions(String s)
getSelectOptions in interface com.thoughtworks.selenium.Seleniumpublic String getAttribute(String s)
getAttribute in interface com.thoughtworks.selenium.Seleniumpublic boolean isTextPresent(String s)
isTextPresent in interface com.thoughtworks.selenium.Seleniumpublic boolean isElementPresent(String elemLocator)
isElementPresent in interface com.thoughtworks.selenium.Seleniumpublic MockSeleniumClient addPresentElements(String... elements)
public boolean isVisible(String s)
isVisible in interface com.thoughtworks.selenium.Seleniumpublic boolean isEditable(String s)
isEditable in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllButtons()
getAllButtons in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllLinks()
getAllLinks in interface com.thoughtworks.selenium.Seleniumpublic String[] getAllFields()
getAllFields in interface com.thoughtworks.selenium.Seleniumpublic String[] getAttributeFromAllWindows(String s)
getAttributeFromAllWindows in interface com.thoughtworks.selenium.Selenium
public void dragdrop(String s,
String s1)
dragdrop in interface com.thoughtworks.selenium.Seleniumpublic void setMouseSpeed(String s)
setMouseSpeed in interface com.thoughtworks.selenium.Seleniumpublic Number getMouseSpeed()
getMouseSpeed in interface com.thoughtworks.selenium.Selenium
public void dragAndDrop(String s,
String s1)
dragAndDrop in interface com.thoughtworks.selenium.Selenium
public void dragAndDropToObject(String s,
String s1)
dragAndDropToObject in interface com.thoughtworks.selenium.Seleniumpublic void windowFocus()
windowFocus in interface com.thoughtworks.selenium.Seleniumpublic void windowMaximize()
windowMaximize 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 getHtmlSource()
getHtmlSource in interface com.thoughtworks.selenium.Selenium
public void setCursorPosition(String s,
String s1)
setCursorPosition in interface com.thoughtworks.selenium.Seleniumpublic Number getElementIndex(String s)
getElementIndex in interface com.thoughtworks.selenium.Selenium
public boolean isOrdered(String s,
String s1)
isOrdered in interface com.thoughtworks.selenium.Seleniumpublic Number getElementPositionLeft(String s)
getElementPositionLeft in interface com.thoughtworks.selenium.Seleniumpublic Number getElementPositionTop(String s)
getElementPositionTop in interface com.thoughtworks.selenium.Seleniumpublic Number getElementWidth(String s)
getElementWidth in interface com.thoughtworks.selenium.Seleniumpublic Number getElementHeight(String s)
getElementHeight in interface com.thoughtworks.selenium.Seleniumpublic Number getCursorPosition(String s)
getCursorPosition in interface com.thoughtworks.selenium.Seleniumpublic String getExpression(String s)
getExpression in interface com.thoughtworks.selenium.Seleniumpublic Number getXpathCount(String s)
getXpathCount in interface com.thoughtworks.selenium.Seleniumpublic Number getCssCount(String css)
getCssCount in interface com.thoughtworks.selenium.Selenium
public void assignId(String s,
String s1)
assignId in interface com.thoughtworks.selenium.Seleniumpublic void allowNativeXpath(String s)
allowNativeXpath in interface com.thoughtworks.selenium.Seleniumpublic void ignoreAttributesWithoutValue(String s)
ignoreAttributesWithoutValue in interface com.thoughtworks.selenium.Selenium
public void waitForCondition(String s,
String s1)
waitForCondition in interface com.thoughtworks.selenium.Seleniumpublic void setTimeout(String s)
setTimeout in interface com.thoughtworks.selenium.Seleniumpublic void waitForPageToLoad(String s)
waitForPageToLoad in interface com.thoughtworks.selenium.Selenium
public void waitForFrameToLoad(String s,
String s1)
waitForFrameToLoad in interface com.thoughtworks.selenium.Seleniumpublic String getCookie()
getCookie in interface com.thoughtworks.selenium.Seleniumpublic String getCookieByName(String s)
getCookieByName in interface com.thoughtworks.selenium.Seleniumpublic boolean isCookiePresent(String s)
isCookiePresent in interface com.thoughtworks.selenium.Selenium
public void createCookie(String s,
String s1)
createCookie in interface com.thoughtworks.selenium.Selenium
public void deleteCookie(String s,
String s1)
deleteCookie in interface com.thoughtworks.selenium.Seleniumpublic void deleteAllVisibleCookies()
deleteAllVisibleCookies in interface com.thoughtworks.selenium.Seleniumpublic void setBrowserLogLevel(String s)
setBrowserLogLevel in interface com.thoughtworks.selenium.Seleniumpublic void runScript(String s)
runScript in interface com.thoughtworks.selenium.Selenium
public void addLocationStrategy(String s,
String s1)
addLocationStrategy in interface com.thoughtworks.selenium.Selenium
public void captureEntirePageScreenshot(String s,
String s1)
captureEntirePageScreenshot in interface com.thoughtworks.selenium.Selenium
public void rollup(String s,
String s1)
rollup in interface com.thoughtworks.selenium.Selenium
public void addScript(String s,
String s1)
addScript in interface com.thoughtworks.selenium.Seleniumpublic void removeScript(String s)
removeScript in interface com.thoughtworks.selenium.Seleniumpublic void useXpathLibrary(String s)
useXpathLibrary in interface com.thoughtworks.selenium.Seleniumpublic void setContext(String s)
setContext in interface com.thoughtworks.selenium.Selenium
public void attachFile(String s,
String s1)
attachFile in interface com.thoughtworks.selenium.Seleniumpublic void captureScreenshot(String s)
captureScreenshot in interface com.thoughtworks.selenium.Seleniumpublic String captureScreenshotToString()
captureScreenshotToString in interface com.thoughtworks.selenium.Seleniumpublic String captureNetworkTraffic(String s)
captureNetworkTraffic in interface com.thoughtworks.selenium.Selenium
public void addCustomRequestHeader(String s,
String s1)
addCustomRequestHeader in interface com.thoughtworks.selenium.Seleniumpublic String captureEntirePageScreenshotToString(String s)
captureEntirePageScreenshotToString in interface com.thoughtworks.selenium.Seleniumpublic void shutDownSeleniumServer()
shutDownSeleniumServer in interface com.thoughtworks.selenium.Seleniumpublic String retrieveLastRemoteControlLogs()
retrieveLastRemoteControlLogs in interface com.thoughtworks.selenium.Seleniumpublic void keyDownNative(String s)
keyDownNative in interface com.thoughtworks.selenium.Seleniumpublic void keyUpNative(String s)
keyUpNative in interface com.thoughtworks.selenium.Seleniumpublic void keyPressNative(String s)
keyPressNative in interface com.thoughtworks.selenium.Seleniumpublic void openNoWait(String url)
SeleniumClient
openNoWait in interface SeleniumClient
public void open(String url,
long timeoutMillis)
SeleniumClient
open in interface SeleniumClientpublic void waitForPageToLoad(long timeoutMillis)
SeleniumClientSelenium.waitForPageToLoad(String) to take in a long.
waitForPageToLoad in interface SeleniumClientpublic void waitForPageToLoad()
SeleniumClientSeleniumConfiguration.
waitForPageToLoad in interface SeleniumClientpublic void waitForCondition(String javascript)
SeleniumClientSeleniumConfiguration.getActionWait milliseconds.
waitForCondition in interface SeleniumClientif you would like to specify your own timeout.
public void waitForCondition(String javascript,
long timeoutMillis)
SeleniumClient
waitForCondition in interface SeleniumClientpublic void waitForAjaxWithJquery()
SeleniumClient#ACTION_WAIT milliseconds
waitForAjaxWithJquery in interface SeleniumClientif you would like to specify your own timeout.public void waitForAjaxWithJquery(long timeoutMillis)
SeleniumClient
waitForAjaxWithJquery in interface SeleniumClient
public void click(String locator,
boolean waitForPageToLoad)
SeleniumClient#PAGE_LOAD_WAIT.
click in interface SeleniumClientlocator - the element to click, specified using Selenium selector syntaxwaitForPageToLoad - whether to wait for the page to reload. Don't use this unless the page is completely
reloaded.if you would like to specify your own timeout.
public void submit(String form,
boolean waitForPageToLoad)
SeleniumClient#PAGE_LOAD_WAIT.
submit in interface SeleniumClientform - to click, specified using Selenium selector syntaxwaitForPageToLoad - whether to wait for the page to reload. Don't use this unless the page is completely
reloaded.if you would like to specify your own timeout.
public void click(String locator,
long timeoutMillis)
SeleniumClient
click in interface SeleniumClientlocator - the element to click, specified using Selenium selector syntaxtimeoutMillis - the maximum number of milliseconds to wait for the page to load. Polling takes place
more frequently.if you would like to use the default timeoutpublic void clickAndWaitForAjaxWithJquery(String locator)
SeleniumClient
clickAndWaitForAjaxWithJquery in interface SeleniumClientlocator - the element to click, specified using Selenium selector syntax
public void clickAndWaitForAjaxWithJquery(String locator,
long timeoutMillis)
SeleniumClient
clickAndWaitForAjaxWithJquery in interface SeleniumClientlocator - the element to click, specified using Selenium selector syntaxtimeoutMillis - the maximum number of milliseconds to wait for the ajax calls to finish.if you would like to use the default timeout
public void submit(String form,
long timeoutMillis)
SeleniumClient
submit in interface SeleniumClientform - the form to submittimeoutMillis - the maximum number of milliseconds to wait for the page to load. Polling takes place
more frequently.if you would like to use the default timeout
public void keyPress(String locator,
String key)
SeleniumClient
keyPress in interface SeleniumClientkeyPress in interface com.thoughtworks.selenium.Seleniumlocator - Uses the Selenium locator syntaxkey - The key to be pressedpublic void shiftKeyDown()
shiftKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void shiftKeyUp()
shiftKeyUp 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 altKeyDown()
altKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void altKeyUp()
altKeyUp in interface com.thoughtworks.selenium.Seleniumpublic void controlKeyDown()
controlKeyDown in interface com.thoughtworks.selenium.Seleniumpublic void controlKeyUp()
controlKeyUp in interface com.thoughtworks.selenium.Selenium
public void keyDown(String s,
String s1)
keyDown in interface com.thoughtworks.selenium.Selenium
public void keyUp(String s,
String s1)
keyUp in interface com.thoughtworks.selenium.Seleniumpublic void mouseOver(String s)
mouseOver in interface com.thoughtworks.selenium.Seleniumpublic void mouseOut(String s)
mouseOut in interface com.thoughtworks.selenium.Seleniumpublic void mouseDown(String s)
mouseDown in interface com.thoughtworks.selenium.Seleniumpublic void mouseDownRight(String s)
mouseDownRight in interface com.thoughtworks.selenium.Selenium
public void mouseDownAt(String s,
String s1)
mouseDownAt in interface com.thoughtworks.selenium.Selenium
public void mouseDownRightAt(String s,
String s1)
mouseDownRightAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseUp(String s)
mouseUp in interface com.thoughtworks.selenium.Seleniumpublic void mouseUpRight(String s)
mouseUpRight in interface com.thoughtworks.selenium.Selenium
public void mouseUpAt(String s,
String s1)
mouseUpAt in interface com.thoughtworks.selenium.Selenium
public void mouseUpRightAt(String s,
String s1)
mouseUpRightAt in interface com.thoughtworks.selenium.Seleniumpublic void mouseMove(String s)
mouseMove in interface com.thoughtworks.selenium.Selenium
public void mouseMoveAt(String s,
String s1)
mouseMoveAt in interface com.thoughtworks.selenium.Selenium
public void type(String s,
String s1)
type in interface com.thoughtworks.selenium.Selenium
public void typeKeys(String s,
String s1)
typeKeys in interface com.thoughtworks.selenium.Seleniumpublic void setSpeed(String s)
setSpeed in interface com.thoughtworks.selenium.Seleniumpublic String getSpeed()
getSpeed in interface com.thoughtworks.selenium.Seleniumpublic String getLog()
getLog in interface com.thoughtworks.selenium.Seleniumpublic void check(String s)
check in interface com.thoughtworks.selenium.Seleniumpublic void uncheck(String s)
uncheck in interface com.thoughtworks.selenium.Selenium
public void select(String s,
String s1)
select in interface com.thoughtworks.selenium.Selenium
public void addSelection(String s,
String s1)
addSelection in interface com.thoughtworks.selenium.Selenium
public void removeSelection(String s,
String s1)
removeSelection in interface com.thoughtworks.selenium.Seleniumpublic void removeAllSelections(String s)
removeAllSelections in interface com.thoughtworks.selenium.Seleniumpublic void submit(String s)
submit in interface com.thoughtworks.selenium.Selenium
public void open(String s,
String s1)
open in interface com.thoughtworks.selenium.Selenium
public void typeWithFullKeyEvents(String locator,
String string,
boolean reset)
SeleniumClient
typeWithFullKeyEvents in interface SeleniumClientlocator - the Selenium locatorstring - the string to typereset - Should the field be reset first?
public void typeWithFullKeyEvents(String locator,
String string)
SeleniumClientSeleniumClient.typeWithFullKeyEvents(String,String,boolean))}
typeWithFullKeyEvents in interface SeleniumClientlocator - - the usual Selenium locatorstring - the string to type into a field
public void simulateKeyPressForCharacter(String locator,
Character character,
Collection<KeyEventType> eventsToFire)
SeleniumClient
simulateKeyPressForCharacter in interface SeleniumClientlocator - - the usual Selenium locatorcharacter - - the character to sendeventsToFire - - a collection of the types of events to Fire
public void simulateKeyPressForCharacter(String s,
Character character)
SeleniumClient
simulateKeyPressForCharacter in interface SeleniumClients - - the usual Selenium locatorcharacter - - the character to send
public void simulateKeyPressForSpecialKey(String locator,
int keyCode,
Collection<KeyEventType> eventsToFire)
SeleniumClient
simulateKeyPressForSpecialKey in interface SeleniumClientlocator - - the usual Selenium locatorkeyCode - - the code for the special Key can use java.awt.event.KeyEvent.XXX to find theseeventsToFire - - a collection of the types of events to Fire
public void generateKeyEvent(String locator,
KeyEventType eventType,
int keyCode,
int characterCode,
boolean shiftKey,
boolean altKey,
boolean controlKey,
boolean metaKey)
SeleniumClient
generateKeyEvent in interface SeleniumClientlocator - - the locator of the element to send the keyevent toeventType - - The type of key eventkeyCode - - the keyCode for the keyEventcharacterCode - - the character code for the key eventshiftKey - - Is the shift key down?altKey - - Is the alt/option key down?controlKey - - Is the control key down?metaKey - - Is the meta (aka the apple or windows) key down?
public void simulateKeyPressForSpecialKey(String s,
int i)
SeleniumClient
simulateKeyPressForSpecialKey in interface SeleniumClients - - the usual Selenium locatori - - the code for the special Key can use java.awt.event.KeyEvent.XXX to find thesepublic void toggleToKeyCode(boolean b)
SeleniumClient
toggleToKeyCode in interface SeleniumClientb - - to set or not to set the keyCode in the eventpublic void toggleToCharacterCode(boolean b)
SeleniumClient
toggleToCharacterCode in interface SeleniumClientb - - to set or not to set the characterCode in the event
public void selectOption(String selectName,
String label)
SeleniumClientselect field.
selectOption in interface SeleniumClientselectName - the select field namelabel - the label to select
public void selectOptionAndWaitForAjaxWithJquery(String selectName,
String label)
SeleniumClientselect field. If the field calls executes an ajax call onchange of
the value, this method will wait for that ajax method to finish.
selectOptionAndWaitForAjaxWithJquery in interface SeleniumClientselectName - the select field namelabel - the label to select
public void check(String name,
String value)
SeleniumClient
check in interface SeleniumClient
public void clickLinkWithText(String text,
boolean waitForPageToLoad)
clickLinkWithText in interface SeleniumClient
public void clickButton(String buttonText,
boolean waitForPageToLoad)
clickButton in interface SeleniumClientpublic void clickButtonAndWaitForAjaxWithJquery(String buttonText)
clickButtonAndWaitForAjaxWithJquery in interface SeleniumClient
public void clickButtonWithName(String buttonName,
boolean waitForPageToLoad)
clickButtonWithName in interface SeleniumClientpublic void clickButtonWithNameAndWaitForAjaxWithJquery(String buttonName)
clickButtonWithNameAndWaitForAjaxWithJquery in interface SeleniumClientpublic void clickElementWithTitle(String title)
clickElementWithTitle in interface SeleniumClientpublic void clickElementWithTitleAndWaitForAjaxWithJquery(String title)
clickElementWithTitleAndWaitForAjaxWithJquery in interface SeleniumClientpublic void clickElementWithClass(String className)
clickElementWithClass in interface SeleniumClientpublic void clickElementWithClassAndWaitForAjaxWithJquery(String className)
clickElementWithClassAndWaitForAjaxWithJquery in interface SeleniumClientpublic void clickElementWithCss(String cssSelector)
clickElementWithCss in interface SeleniumClientpublic void clickElementWithCssAndWaitForAjaxWithJquery(String cssSelector)
clickElementWithCssAndWaitForAjaxWithJquery in interface SeleniumClientpublic void clickElementWithXpath(String xpath)
clickElementWithXpath in interface SeleniumClientpublic void clickElementWithXpathAndWaitForAjaxWithJquery(String xpath)
clickElementWithXpathAndWaitForAjaxWithJquery in interface SeleniumClient
public void typeInElementWithName(String elementName,
String text)
typeInElementWithName in interface SeleniumClient
public void typeInElementWithCss(String cssSelector,
String text)
typeInElementWithCss in interface SeleniumClientpublic boolean hasJquery()
hasJquery in interface SeleniumClientpublic void setExtensionJs(String s)
setExtensionJs in interface com.thoughtworks.selenium.Seleniumpublic void start()
start in interface SeleniumClientstart in interface com.thoughtworks.selenium.Seleniumpublic void start(String s)
start in interface com.thoughtworks.selenium.Seleniumpublic void start(Object o)
start in interface com.thoughtworks.selenium.Seleniumpublic void stop()
stop in interface com.thoughtworks.selenium.Seleniumpublic void showContextualBanner()
showContextualBanner in interface com.thoughtworks.selenium.Selenium
public void showContextualBanner(String s,
String s1)
showContextualBanner in interface com.thoughtworks.selenium.Seleniumpublic void click(String s)
click in interface com.thoughtworks.selenium.Seleniumpublic void doubleClick(String s)
doubleClick in interface com.thoughtworks.selenium.Seleniumpublic void contextMenu(String s)
contextMenu in interface com.thoughtworks.selenium.Selenium
public void clickAt(String s,
String s1)
clickAt in interface com.thoughtworks.selenium.Selenium
public void doubleClickAt(String s,
String s1)
doubleClickAt in interface com.thoughtworks.selenium.Selenium
public void contextMenuAt(String s,
String s1)
contextMenuAt in interface com.thoughtworks.selenium.Selenium
public void fireEvent(String s,
String s1)
fireEvent in interface com.thoughtworks.selenium.Seleniumpublic void focus(String s)
focus in interface com.thoughtworks.selenium.Seleniumpublic Browser getBrowser()
getBrowser in interface SeleniumClient
public void seleniumKeyPress(String locator,
String key)
seleniumKeyPress in interface SeleniumClientpublic void evaluate(String command)
VisualComparableClient
evaluate in interface VisualComparableClientcommand - a string of javascript to send to the client.
public Object execute(String command,
Object... arguments)
VisualComparableClient
execute in interface VisualComparableClientcommand - a string of javascript to send to the client.arguments - additional arguments to provide to the script.
public void captureEntirePageScreenshot(String filePath)
captureEntirePageScreenshot in interface VisualComparableClient
public boolean resizeScreen(ScreenResolution resolution,
boolean refreshAfterResize)
resizeScreen in interface VisualComparableClientpublic void refreshAndWait()
refreshAndWait in interface VisualComparableClientpublic boolean waitForJQuery(long waitTimeMillis)
VisualComparableClient
waitForJQuery in interface VisualComparableClientwaitTimeMillis - the time to wait for everything to finish.
public ScreenElement getElementAtPoint(int x,
int y)
getElementAtPoint in interface VisualComparableClient
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||