com.atlassian.selenium
Class SingleBrowserSeleniumClient

java.lang.Object
  extended by com.thoughtworks.selenium.DefaultSelenium
      extended by com.atlassian.selenium.SingleBrowserSeleniumClient
All Implemented Interfaces:
SeleniumClient, VisualComparableClient, com.thoughtworks.selenium.Selenium

public class SingleBrowserSeleniumClient
extends com.thoughtworks.selenium.DefaultSelenium
implements SeleniumClient

Extends the DefaultSelenium client to provide a more sensible implementation as well some extra utility methods such as keypress.


Field Summary
protected  long ACTION_WAIT
          The maximum wait time for actions that don't require page loads.
protected  long PAGE_LOAD_WAIT
          The maximum page load wait time used by Selenium.
 
Fields inherited from class com.thoughtworks.selenium.DefaultSelenium
commandProcessor
 
Constructor Summary
SingleBrowserSeleniumClient(SeleniumConfiguration config)
           
 
Method Summary
 void captureEntirePageScreenshot(String filePath)
           
 void check(String name, String value)
          Checks a checkbox given a name and value.
 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 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 evaluate(String command)
          Execute a script in the client.
 Object execute(String command, Object... arguments)
          Execute a script on the client.
 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.
 Browser getBrowser()
           
 ScreenElement getElementAtPoint(int x, int y)
           
 boolean hasJquery()
           
 void keyPress(String locator, String key)
          This will type into a field by sending key down / key press / key up events.
 void open(String url)
          Unlike DefaultSelenium.open(java.lang.String, java.lang.String), 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 openNoWait(String url)
          Wait for page to load doesn't work the case of non-HTML based resources (like images).
 void refreshAndWait()
           
 boolean resizeScreen(ScreenResolution resolution, boolean refreshAfterResize)
           
 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 seleniumKeyPress(String locator, String key)
           
 void simulateKeyPressForCharacter(String locator, 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 locator, int keyCode)
          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 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 toCharacterCode)
          This sets if subsiquent calls to the keyEvent (@keyDown, @keyPress, @keyUp) fuctions will set the code in the characterCode or not.
 void toggleToKeyCode(boolean toKeyCode)
          This sets if subsiquent calls to the keyEvent (@keyDown, @keyPress, @keyUp) fuctions will set the code in the keyCode or not.
 void typeInElementWithCss(String cssSelector, String text)
           
 void typeInElementWithName(String elementName, String text)
           
 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 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 ACTION_WAIT 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.
 boolean waitForJQuery(long waitTimeMillis)
          Wait for jQuery AJAX calls to return.
 void waitForPageToLoad()
          Waits for the page to load with the default timeout configured in SeleniumConfiguration.
 void waitForPageToLoad(long timeoutMillis)
          Overloads DefaultSelenium.waitForPageToLoad(String) to take in a long.
 
Methods inherited from class com.thoughtworks.selenium.DefaultSelenium
addCustomRequestHeader, addLocationStrategy, addScript, addSelection, allowNativeXpath, altKeyDown, altKeyUp, answerOnNextPrompt, assignId, attachFile, captureEntirePageScreenshot, captureEntirePageScreenshotToString, captureNetworkTraffic, captureScreenshot, captureScreenshotToString, check, chooseCancelOnNextConfirmation, chooseOkOnNextConfirmation, click, clickAt, close, contextMenu, contextMenuAt, controlKeyDown, controlKeyUp, createCookie, deleteAllVisibleCookies, deleteCookie, deselectPopUp, doubleClick, doubleClickAt, dragAndDrop, dragAndDropToObject, dragdrop, fireEvent, focus, getAlert, getAllButtons, getAllFields, getAllLinks, getAllWindowIds, getAllWindowNames, getAllWindowTitles, getAttribute, getAttributeFromAllWindows, getBodyText, getConfirmation, getCookie, getCookieByName, getCssCount, getCursorPosition, getElementHeight, getElementIndex, getElementPositionLeft, getElementPositionTop, getElementWidth, getEval, getExpression, getHtmlSource, getLocation, getLog, getMouseSpeed, getPrompt, getSelectedId, getSelectedIds, getSelectedIndex, getSelectedIndexes, getSelectedLabel, getSelectedLabels, getSelectedValue, getSelectedValues, getSelectOptions, getSpeed, getTable, getText, getTitle, getValue, getWhetherThisFrameMatchFrameExpression, getWhetherThisWindowMatchWindowExpression, getXpathCount, goBack, highlight, ignoreAttributesWithoutValue, isAlertPresent, isChecked, isConfirmationPresent, isCookiePresent, isEditable, isElementPresent, isOrdered, isPromptPresent, isSomethingSelected, isTextPresent, isVisible, keyDown, keyDownNative, keyPressNative, keyUp, keyUpNative, metaKeyDown, metaKeyUp, mouseDown, mouseDownAt, mouseDownRight, mouseDownRightAt, mouseMove, mouseMoveAt, mouseOut, mouseOver, mouseUp, mouseUpAt, mouseUpRight, mouseUpRightAt, open, openWindow, refresh, removeAllSelections, removeScript, removeSelection, retrieveLastRemoteControlLogs, rollup, runScript, select, selectFrame, selectPopUp, selectWindow, setBrowserLogLevel, setContext, setCursorPosition, setExtensionJs, setMouseSpeed, setSpeed, setTimeout, shiftKeyDown, shiftKeyUp, showContextualBanner, showContextualBanner, shutDownSeleniumServer, start, start, stop, submit, type, typeKeys, uncheck, useXpathLibrary, waitForCondition, waitForFrameToLoad, waitForPageToLoad, waitForPopUp, windowFocus, windowMaximize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.thoughtworks.selenium.Selenium
addCustomRequestHeader, addLocationStrategy, addScript, addSelection, allowNativeXpath, altKeyDown, altKeyUp, answerOnNextPrompt, assignId, attachFile, captureEntirePageScreenshot, captureEntirePageScreenshotToString, captureNetworkTraffic, captureScreenshot, captureScreenshotToString, check, chooseCancelOnNextConfirmation, chooseOkOnNextConfirmation, click, clickAt, close, contextMenu, contextMenuAt, controlKeyDown, controlKeyUp, createCookie, deleteAllVisibleCookies, deleteCookie, deselectPopUp, doubleClick, doubleClickAt, dragAndDrop, dragAndDropToObject, dragdrop, fireEvent, focus, getAlert, getAllButtons, getAllFields, getAllLinks, getAllWindowIds, getAllWindowNames, getAllWindowTitles, getAttribute, getAttributeFromAllWindows, getBodyText, getConfirmation, getCookie, getCookieByName, getCssCount, getCursorPosition, getElementHeight, getElementIndex, getElementPositionLeft, getElementPositionTop, getElementWidth, getEval, getExpression, getHtmlSource, getLocation, getLog, getMouseSpeed, getPrompt, getSelectedId, getSelectedIds, getSelectedIndex, getSelectedIndexes, getSelectedLabel, getSelectedLabels, getSelectedValue, getSelectedValues, getSelectOptions, getSpeed, getTable, getText, getTitle, getValue, getWhetherThisFrameMatchFrameExpression, getWhetherThisWindowMatchWindowExpression, getXpathCount, goBack, highlight, ignoreAttributesWithoutValue, isAlertPresent, isChecked, isConfirmationPresent, isCookiePresent, isEditable, isElementPresent, isOrdered, isPromptPresent, isSomethingSelected, isTextPresent, isVisible, keyDown, keyDownNative, keyPressNative, keyUp, keyUpNative, metaKeyDown, metaKeyUp, mouseDown, mouseDownAt, mouseDownRight, mouseDownRightAt, mouseMove, mouseMoveAt, mouseOut, mouseOver, mouseUp, mouseUpAt, mouseUpRight, mouseUpRightAt, open, openWindow, refresh, removeAllSelections, removeScript, removeSelection, retrieveLastRemoteControlLogs, rollup, runScript, select, selectFrame, selectPopUp, selectWindow, setBrowserLogLevel, setContext, setCursorPosition, setExtensionJs, setMouseSpeed, setSpeed, setTimeout, shiftKeyDown, shiftKeyUp, showContextualBanner, showContextualBanner, shutDownSeleniumServer, start, start, stop, submit, type, typeKeys, uncheck, useXpathLibrary, waitForCondition, waitForFrameToLoad, waitForPageToLoad, waitForPopUp, windowFocus, windowMaximize
 

Field Detail

PAGE_LOAD_WAIT

protected final long PAGE_LOAD_WAIT
The maximum page load wait time used by Selenium. This value is set with SeleniumConfiguration.getPageLoadWait().


ACTION_WAIT

protected final long ACTION_WAIT
The maximum wait time for actions that don't require page loads. This value is set with SeleniumConfiguration.getActionWait().

Constructor Detail

SingleBrowserSeleniumClient

public SingleBrowserSeleniumClient(SeleniumConfiguration config)
Method Detail

getBrowser

public Browser getBrowser()
Specified by:
getBrowser in interface SeleniumClient

seleniumKeyPress

public void seleniumKeyPress(String locator,
                             String key)
Specified by:
seleniumKeyPress in interface SeleniumClient

open

public void open(String url)
Unlike DefaultSelenium.open(java.lang.String, java.lang.String), 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.

Specified by:
open in interface SeleniumClient
Specified by:
open in interface com.thoughtworks.selenium.Selenium
Overrides:
open in class com.thoughtworks.selenium.DefaultSelenium

openNoWait

public void openNoWait(String url)
Wait for page to load doesn't work the case of non-HTML based resources (like images). So sometimes you really do want to open a url without waiting.

Specified by:
openNoWait in interface SeleniumClient
Parameters:
url -

open

public void open(String url,
                 long timeoutMillis)
Opens the given URL and waits a maximum of timeoutMillis for the page to load completely.

Specified by:
open in interface SeleniumClient

waitForPageToLoad

public void waitForPageToLoad(long timeoutMillis)
Overloads DefaultSelenium.waitForPageToLoad(String) to take in a long.

Specified by:
waitForPageToLoad in interface SeleniumClient

waitForPageToLoad

public void waitForPageToLoad()
Waits for the page to load with the default timeout configured in SeleniumConfiguration.

Specified by:
waitForPageToLoad in interface SeleniumClient

waitForCondition

public 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 ACTION_WAIT milliseconds.

Specified by:
waitForCondition in interface SeleniumClient
See Also:
if you would like to specify your own timeout.

waitForCondition

public 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.

Specified by:
waitForCondition in interface SeleniumClient

waitForAjaxWithJquery

public void waitForAjaxWithJquery()
Waits for the page to finish loading ajax calls, and returns if there are no more ajax calls currently running. The method will check for a maximum of ACTION_WAIT milliseconds

Specified by:
waitForAjaxWithJquery in interface SeleniumClient
See Also:
if you would like to specify your own timeout.

waitForAjaxWithJquery

public void waitForAjaxWithJquery(long timeoutMillis)
Waits for the page to finish loading ajax calls, and returns if there are no more ajax calls currently running. The method will check for a maximum of timeoutMillis

Specified by:
waitForAjaxWithJquery in interface SeleniumClient

click

public 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.

Specified by:
click in interface SeleniumClient
Parameters:
locator - the element to click, specified using Selenium selector syntax
waitForPageToLoad - whether to wait for the page to reload. Don't use this unless the page is completely reloaded.
See Also:
if you would like to specify your own timeout.

submit

public void submit(String form,
                   boolean waitForPageToLoad)
Submit the named form locator and optionally wait for the page to load, using PAGE_LOAD_WAIT.

Specified by:
submit in interface SeleniumClient
Parameters:
form - to click, specified using Selenium selector syntax
waitForPageToLoad - whether to wait for the page to reload. Don't use this unless the page is completely reloaded.
See Also:
if you would like to specify your own timeout.

click

public 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.

Do not use this method if the page does not reload.

Specified by:
click in interface SeleniumClient
Parameters:
locator - the element to click, specified using Selenium selector syntax
timeoutMillis - the maximum number of milliseconds to wait for the page to load. Polling takes place more frequently.
See Also:
if you would like to use the default timeout

clickAndWaitForAjaxWithJquery

public void clickAndWaitForAjaxWithJquery(String locator)
Click the element with the given locator and wait for the ajax call to finish.

Specified by:
clickAndWaitForAjaxWithJquery in interface SeleniumClient
Parameters:
locator - the element to click, specified using Selenium selector syntax

clickAndWaitForAjaxWithJquery

public void clickAndWaitForAjaxWithJquery(String locator,
                                          long timeoutMillis)
Click the element with the given locator and wait for the ajax call to finish.

Specified by:
clickAndWaitForAjaxWithJquery in interface SeleniumClient
Parameters:
locator - the element to click, specified using Selenium selector syntax
timeoutMillis - the maximum number of milliseconds to wait for the ajax calls to finish.
See Also:
if you would like to use the default timeout

submit

public void submit(String form,
                   long timeoutMillis)
Submit the given form and wait for the page to load, for a maximum of timeoutMillis.

Do not use this method if the page does not reload.

Specified by:
submit in interface SeleniumClient
Parameters:
form - the form to submit
timeoutMillis - the maximum number of milliseconds to wait for the page to load. Polling takes place more frequently.
See Also:
if you would like to use the default timeout

keyPress

public void keyPress(String locator,
                     String key)
This will type into a field by sending key down / key press / key up events.

Specified by:
keyPress in interface SeleniumClient
Specified by:
keyPress in interface com.thoughtworks.selenium.Selenium
Overrides:
keyPress in class com.thoughtworks.selenium.DefaultSelenium
Parameters:
locator - Uses the Selenium locator syntax
key - The key to be pressed

typeWithFullKeyEvents

public 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.

Specified by:
typeWithFullKeyEvents in interface SeleniumClient
Parameters:
locator - the Selenium locator
string - the string to type
reset - Should the field be reset first?

typeWithFullKeyEvents

public 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. This really only calls typeWithFullKeyEvents(String,String,boolean))}

Specified by:
typeWithFullKeyEvents in interface SeleniumClient
Parameters:
locator - - the usual Selenium locator
string - the string to type into a field

simulateKeyPressForCharacter

public void simulateKeyPressForCharacter(String locator,
                                         Character character)
Description copied from interface: SeleniumClient
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. NO events will be fired). This will fire ALL events for the Character *

Specified by:
simulateKeyPressForCharacter in interface SeleniumClient
Parameters:
locator - - the usual Selenium locator
character - - the character to send

simulateKeyPressForCharacter

public void simulateKeyPressForCharacter(String locator,
                                         Character character,
                                         Collection<KeyEventType> eventsToFire)
Description copied from interface: SeleniumClient
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. NO events will be fired). *

Specified by:
simulateKeyPressForCharacter in interface SeleniumClient
Parameters:
locator - - the usual Selenium locator
character - - the character to send
eventsToFire - - a collection of the types of events to Fire

simulateKeyPressForSpecialKey

public void simulateKeyPressForSpecialKey(String locator,
                                          int keyCode)
Description copied from interface: SeleniumClient
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. *

Specified by:
simulateKeyPressForSpecialKey in interface SeleniumClient
Parameters:
locator - - the usual Selenium locator
keyCode - - the code for the special Key can use java.awt.event.KeyEvent.XXX to find these

simulateKeyPressForSpecialKey

public void simulateKeyPressForSpecialKey(String locator,
                                          int keyCode,
                                          Collection<KeyEventType> eventsToFire)
Description copied from interface: SeleniumClient
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 *

Specified by:
simulateKeyPressForSpecialKey in interface SeleniumClient
Parameters:
locator - - the usual Selenium locator
keyCode - - the code for the special Key can use java.awt.event.KeyEvent.XXX to find these
eventsToFire - - a collection of the types of events to Fire

generateKeyEvent

public void generateKeyEvent(String locator,
                             KeyEventType eventType,
                             int keyCode,
                             int characterCode,
                             boolean shiftKey,
                             boolean altKey,
                             boolean controlKey,
                             boolean metaKey)
Description copied from interface: SeleniumClient
This is a low level function to generate one keyboard event. It would be preferable to use the simulatKeyPress... functions above.

Specified by:
generateKeyEvent in interface SeleniumClient
Parameters:
locator - - the locator of the element to send the keyevent to
eventType - - The type of key event
keyCode - - the keyCode for the keyEvent
characterCode - - the character code for the key event
shiftKey - - 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?

toggleToKeyCode

public void toggleToKeyCode(boolean toKeyCode)
Description copied from interface: SeleniumClient
This sets if subsiquent calls to the keyEvent (@keyDown, @keyPress, @keyUp) fuctions will set the code in the keyCode or not. This is applicable to Firefox and webkit.

Specified by:
toggleToKeyCode in interface SeleniumClient
Parameters:
toKeyCode - - to set or not to set the keyCode in the event

toggleToCharacterCode

public void toggleToCharacterCode(boolean toCharacterCode)
Description copied from interface: SeleniumClient
This sets if subsiquent calls to the keyEvent (@keyDown, @keyPress, @keyUp) fuctions will set the code in the characterCode or not. This is applicable to Firefox and webkit.

Specified by:
toggleToCharacterCode in interface SeleniumClient
Parameters:
toCharacterCode - - to set or not to set the characterCode in the event

selectOption

public void selectOption(String selectName,
                         String label)
This will select an option from a select field.

Specified by:
selectOption in interface SeleniumClient
Parameters:
selectName - the select field name
label - the label to select

selectOptionAndWaitForAjaxWithJquery

public void selectOptionAndWaitForAjaxWithJquery(String selectName,
                                                 String label)
This will select an option from a select field. If the field calls executes an ajax call onchange of the value, this method will wait for that ajax method to finish.

Specified by:
selectOptionAndWaitForAjaxWithJquery in interface SeleniumClient
Parameters:
selectName - the select field name
label - the label to select

check

public void check(String name,
                  String value)
Checks a checkbox given a name and value.

Specified by:
check in interface SeleniumClient

clickLinkWithText

public void clickLinkWithText(String text,
                              boolean waitForPageToLoad)
Specified by:
clickLinkWithText in interface SeleniumClient

clickButton

public void clickButton(String buttonText,
                        boolean waitForPageToLoad)
Specified by:
clickButton in interface SeleniumClient

clickButtonAndWaitForAjaxWithJquery

public void clickButtonAndWaitForAjaxWithJquery(String buttonText)
Specified by:
clickButtonAndWaitForAjaxWithJquery in interface SeleniumClient

clickButtonWithName

public void clickButtonWithName(String buttonName,
                                boolean waitForPageToLoad)
Specified by:
clickButtonWithName in interface SeleniumClient

clickButtonWithNameAndWaitForAjaxWithJquery

public void clickButtonWithNameAndWaitForAjaxWithJquery(String buttonName)
Specified by:
clickButtonWithNameAndWaitForAjaxWithJquery in interface SeleniumClient

clickElementWithTitle

public void clickElementWithTitle(String title)
Specified by:
clickElementWithTitle in interface SeleniumClient

clickElementWithTitleAndWaitForAjaxWithJquery

public void clickElementWithTitleAndWaitForAjaxWithJquery(String title)
Specified by:
clickElementWithTitleAndWaitForAjaxWithJquery in interface SeleniumClient

clickElementWithClass

public void clickElementWithClass(String className)
Specified by:
clickElementWithClass in interface SeleniumClient

clickElementWithClassAndWaitForAjaxWithJquery

public void clickElementWithClassAndWaitForAjaxWithJquery(String className)
Specified by:
clickElementWithClassAndWaitForAjaxWithJquery in interface SeleniumClient

clickElementWithCss

public void clickElementWithCss(String cssSelector)
Specified by:
clickElementWithCss in interface SeleniumClient

clickElementWithCssAndWaitForAjaxWithJquery

public void clickElementWithCssAndWaitForAjaxWithJquery(String cssSelector)
Specified by:
clickElementWithCssAndWaitForAjaxWithJquery in interface SeleniumClient

clickElementWithXpath

public void clickElementWithXpath(String xpath)
Specified by:
clickElementWithXpath in interface SeleniumClient

clickElementWithXpathAndWaitForAjaxWithJquery

public void clickElementWithXpathAndWaitForAjaxWithJquery(String xpath)
Specified by:
clickElementWithXpathAndWaitForAjaxWithJquery in interface SeleniumClient

typeInElementWithName

public void typeInElementWithName(String elementName,
                                  String text)
Specified by:
typeInElementWithName in interface SeleniumClient

typeInElementWithCss

public void typeInElementWithCss(String cssSelector,
                                 String text)
Specified by:
typeInElementWithCss in interface SeleniumClient

hasJquery

public boolean hasJquery()
Specified by:
hasJquery in interface SeleniumClient

start

public void start()
Specified by:
start in interface SeleniumClient
Specified by:
start in interface com.thoughtworks.selenium.Selenium
Overrides:
start in class com.thoughtworks.selenium.DefaultSelenium

evaluate

public void evaluate(String command)
Description copied from interface: VisualComparableClient
Execute a script in the client.

Specified by:
evaluate in interface VisualComparableClient
Parameters:
command - a string of javascript to send to the client.

execute

public Object execute(String command,
                      Object... arguments)
Execute a script on the client.

Specified by:
execute in interface VisualComparableClient
Parameters:
command - a string of javascript to send to the client.
arguments - Selenium does not accept additional arguments. These will be ignored.
Returns:
The evaluated result of the script

captureEntirePageScreenshot

public void captureEntirePageScreenshot(String filePath)
Specified by:
captureEntirePageScreenshot in interface VisualComparableClient

resizeScreen

public boolean resizeScreen(ScreenResolution resolution,
                            boolean refreshAfterResize)
Specified by:
resizeScreen in interface VisualComparableClient

refreshAndWait

public void refreshAndWait()
Specified by:
refreshAndWait in interface VisualComparableClient

waitForJQuery

public boolean waitForJQuery(long waitTimeMillis)
Wait for jQuery AJAX calls to return.

Specified by:
waitForJQuery in interface VisualComparableClient
Parameters:
waitTimeMillis - the time to wait for everything to finish.
Returns:

getElementAtPoint

public ScreenElement getElementAtPoint(int x,
                                       int y)
Specified by:
getElementAtPoint in interface VisualComparableClient


Copyright © 2014 Atlassian. All rights reserved.