Graphene Implementation 1.0.0.CR3

org.jboss.arquillian.ajocado.framework
Class TypedSeleniumImpl

java.lang.Object
  extended by org.jboss.arquillian.ajocado.framework.TypedSeleniumImpl
All Implemented Interfaces:
UnsupportedTypedSelenium, TypedSelenium
Direct Known Subclasses:
ExtendedTypedSeleniumImpl

public class TypedSeleniumImpl
extends Object
implements TypedSelenium, UnsupportedTypedSelenium

Wrapper implementation for Selenium object's API to make it type-safe.

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
TypedSeleniumImpl()
           
 
Method Summary
 void addCustomRequestHeader(RequestHeader header)
           
 void addLocationStrategy(ElementLocationStrategy locationStrategy, JavaScript strategyDefinition)
           
 void addScript(JavaScript javaScript)
           
 void addSelection(ElementLocator<?> elementLocator, OptionLocator<?> optionLocator)
           
 void allowNativeXpath(boolean allow)
           
 void altKeyDown()
           
 void altKeyUp()
           
 void answerOnNextPrompt(String answer)
           
 IdLocator assignId(ElementLocator<?> elementLocator, String identifier)
           
 void attachFile(ElementLocator<?> fieldLocator, File fileLocator)
          Sets a file input (upload) field to the file listed in fileLocator
 void attachFile(ElementLocator<?> fieldLocator, URL fileLocator)
          Sets a file input (upload) field to the file listed in fileLocator
 BufferedImage captureEntirePageScreenshot()
           
 void captureEntirePageScreenshot(File filename)
          Saves the entire contents of the current window canvas to a PNG file.
 NetworkTraffic captureNetworkTraffic(NetworkTrafficType type)
           
 BufferedImage captureScreenshot()
           
 void captureScreenshot(File filename)
          Captures a PNG screenshot to the specified file.
 void check(ElementLocator<?> elementLocator)
           
 void chooseCancelOnNextConfirmation()
           
 void chooseOkOnNextConfirmation()
           
 void click(ElementLocator<?> elementLocator)
           
 void clickAt(ElementLocator<?> elementLocator, Point point)
           
 void close()
           
 boolean containsScript(JavaScript javaScript)
           
 void contextMenu(ElementLocator<?> elementLocator)
           
 void contextMenuAt(ElementLocator<?> elementLocator, Point point)
           
 void controlKeyDown()
           
 void controlKeyUp()
           
 CookieCreateOptions createCookie(Cookie cookie)
           
 void createCookie(Cookie cookie, CookieCreateOptions options)
           
 void deleteAllVisibleCookies()
           
 void deleteCookie(String cookieName, CookieDeleteOptions options)
           
 void deselectPopUp()
           
 void doubleClick(ElementLocator<?> elementLocator)
           
 void doubleClickAt(ElementLocator<?> elementLocator, Point point)
           
 void dragAndDrop(ElementLocator<?> elementLocator, Offset offset)
           
 void dragAndDropToObject(ElementLocator<?> elementLocatorOfObjectToBeDragged, ElementLocator<?> elementLocatorOfDragDestinationObject)
           
 void fireEvent(ElementLocator<?> elementLocator, Event event)
           
 void focus(ElementLocator<?> elementLocator)
           
 String getAlert()
           
 List<ElementLocator<?>> getAllButtons()
          Returns the IDs of all buttons on the page.
 Set<Cookie> getAllCookies()
           
 List<ElementLocator<?>> getAllFields()
          Returns the IDs of all input fields on the page.
 List<ElementLocator<?>> getAllLinks()
          Returns the IDs of all links on the page.
 List<WindowNameLocator> getAllWindowIds()
           
 List<String> getAllWindowNames()
          Returns the names of all windows that the browser knows about.
 List<String> getAllWindowTitles()
          Returns the titles of all windows that the browser knows about.
 String getAttribute(AttributeLocator<?> attributeLocator)
           
 String getAttribute(ElementLocator<?> elementLocator, Attribute attribute)
           
 List<String> getAttributeFromAllWindows(Attribute attribute)
          Returns every instance of some attribute from all known windows.
 String getBodyText()
           
 String getConfirmation()
           
 Cookie getCookieByName(String cookieName)
           
 int getCount(IterableLocator<?> locator)
           
 int getCursorPosition(ElementLocator<?> elementLocator)
           
 Dimension getElementDimension(ElementLocator<?> elementLocator)
           
 int getElementHeight(ElementLocator<?> elementLocator)
           
 int getElementIndex(ElementLocator<?> elementLocator)
           
 Point getElementPosition(ElementLocator<?> elementLocator)
           
 int getElementPositionLeft(ElementLocator<?> elementLocator)
           
 int getElementPositionTop(ElementLocator<?> elementLocator)
           
 int getElementWidth(ElementLocator<?> elementLocator)
           
 String getEval(JavaScript script)
           
 JavaScript getExpression(JavaScript expression)
          Returns the specified expression.
 String getHtmlSource()
           
 URL getLocation()
           
 int getMouseSpeed()
           
 String getPrompt()
           
 String getSelectedId(ElementLocator<?> selectLocator)
           
 List<String> getSelectedIds(ElementLocator<?> selectLocator)
           
 int getSelectedIndex(ElementLocator<?> selectLocator)
           
 List<Integer> getSelectedIndexes(ElementLocator<?> selectLocator)
           
 String getSelectedLabel(ElementLocator<?> selectLocator)
           
 List<String> getSelectedLabels(ElementLocator<?> selectLocator)
           
 String getSelectedValue(ElementLocator<?> selectLocator)
           
 List<String> getSelectedValues(ElementLocator<?> selectLocator)
           
 List<String> getSelectOptions(ElementLocator<?> selectLocator)
           
 long getSpeed()
           
 String getText(ElementLocator<?> elementLocator)
           
 String getTitle()
           
 String getValue(ElementLocator<?> elementLocator)
           
 boolean getWhetherThisFrameMatchFrameExpression(String currentFrameString, String target)
          Determine whether current/locator identify the frame containing this running code.
 boolean getWhetherThisWindowMatchWindowExpression(String currentWindowString, String target)
          Determine whether currentWindowString plus target identify the window containing this running code.
 void goBack()
           
 void highlight(ElementLocator<?> elementLocator)
           
 void ignoreAttributesWithoutValue(boolean ignore)
           
 boolean isAlertPresent()
           
 boolean isChecked(ElementLocator<?> elementLocator)
           
 boolean isConfirmationPresent()
           
 boolean isCookiePresent(String cookieName)
           
 boolean isEditable(ElementLocator<?> elementLocator)
           
 boolean isElementPresent(ElementLocator<?> elementLocator)
           
 boolean isOrdered(ElementLocator<?> elementLocator1, ElementLocator<?> elementLocator2)
           
 boolean isPromptPresent()
           
 boolean isSomethingSelected(ElementLocator<?> selectLocator)
           
 boolean isTextPresent(String text)
           
 boolean isVisible(ElementLocator<?> elementLocator)
           
 void keyDown(ElementLocator<?> elementLocator, char character)
           
 void keyDown(ElementLocator<?> elementLocator, KeyCode keyCode)
           
 void keyDownNative(int keycode)
           
 void keyPress(ElementLocator<?> elementLocator, char character)
           
 void keyPress(ElementLocator<?> elementLocator, KeyCode keyCode)
           
 void keyPressNative(int keycode)
           
 void keyUp(ElementLocator<?> elementLocator, char character)
           
 void keyUp(ElementLocator<?> elementLocator, KeyCode keyCode)
           
 void keyUpNative(int keycode)
           
 void logToBrowser(String textToLog)
           
 void metaKeyDown()
           
 void metaKeyUp()
           
 void mouseDown(ElementLocator<?> elementLocator)
           
 void mouseDownAt(ElementLocator<?> elementLocator, Point point)
           
 void mouseDownRight(ElementLocator<?> elementLocator)
           
 void mouseDownRightAt(ElementLocator<?> elementLocator, Point point)
           
 void mouseMove(ElementLocator<?> elementLocator)
           
 void mouseMoveAt(ElementLocator<?> elementLocator, Point point)
           
 void mouseOut(ElementLocator<?> elementLocator)
           
 void mouseOver(ElementLocator<?> elementLocator)
           
 void mouseUp(ElementLocator<?> elementLocator)
           
 void mouseUpAt(ElementLocator<?> elementLocator, Point point)
           
 void mouseUpRight(ElementLocator<?> elementLocator)
           
 void mouseUpRightAt(ElementLocator<?> elementLocator, Point point)
           
 void open(URL url)
           
 void openWindow(URL url, WindowNameLocator windowName)
           
 void refresh()
           
 void removeAllSelections(ElementLocator<?> elementLocator)
           
 void removeScript(JavaScript javaScript)
           
 void removeSelection(ElementLocator<?> elementLocator, OptionLocator<?> optionLocator)
           
 String retrieveLastRemoteControlLogs()
           
 void runScript(JavaScript script)
           
 void select(ElementLocator<?> selectLocator, OptionLocator<?> optionLocator)
           
 void selectFrame(FrameLocator<?> frameLocator)
           
 void selectPopUp(WindowLocator<?> windowLocator)
           
 void selectWindow(WindowLocator<?> windowLocator)
           
 void setBrowserLogLevel(LogLevel logLevel)
           
 void setCursorPosition(ElementLocator<?> elementLocator, int position)
           
 void setExtensionJs(JavaScript extensionJs)
          Sets the per-session extension Javascript
 void setMouseSpeed(int pixels)
           
 void setSpeed(long speedInMilis)
           
 void setTimeout(long timeoutInMilis)
           
 void shiftKeyDown()
           
 void shiftKeyUp()
           
 void shutDownSeleniumServer()
           
 void start()
           
 void stop()
           
 void submit(ElementLocator<?> formLocator)
           
 void type(ElementLocator<?> elementLocator, String value)
           
 void typeKeys(ElementLocator<?> elementLocator, String value)
           
 void uncheck(ElementLocator<?> elementLocator)
           
 void useXpathLibrary(XPathLibrary xPathLibrary)
           
 void waitForCondition(JavaScript script)
           
 void waitForCondition(JavaScript script, long timeout)
           
 void waitForFrameToLoad(URL frameURL)
           
 void waitForFrameToLoad(URL frameURL, long timeout)
           
 void waitForPageToLoad()
           
 void waitForPageToLoad(long timeout)
           
 void waitForPopUp(WindowNameLocator windowNameLocator, long timeoutInMilis)
           
 void windowFocus()
           
 void windowMaximize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedSeleniumImpl

public TypedSeleniumImpl()
Method Detail

addLocationStrategy

public void addLocationStrategy(ElementLocationStrategy locationStrategy,
                                JavaScript strategyDefinition)
Specified by:
addLocationStrategy in interface TypedSelenium

addScript

public void addScript(JavaScript javaScript)
Specified by:
addScript in interface TypedSelenium

addSelection

public void addSelection(ElementLocator<?> elementLocator,
                         OptionLocator<?> optionLocator)
Specified by:
addSelection in interface TypedSelenium

allowNativeXpath

public void allowNativeXpath(boolean allow)
Specified by:
allowNativeXpath in interface TypedSelenium

altKeyDown

public void altKeyDown()
Specified by:
altKeyDown in interface TypedSelenium

altKeyUp

public void altKeyUp()
Specified by:
altKeyUp in interface TypedSelenium

answerOnNextPrompt

public void answerOnNextPrompt(String answer)
Specified by:
answerOnNextPrompt in interface TypedSelenium

assignId

public IdLocator assignId(ElementLocator<?> elementLocator,
                          String identifier)
Specified by:
assignId in interface TypedSelenium

attachFile

public void attachFile(ElementLocator<?> fieldLocator,
                       File fileLocator)
Description copied from interface: UnsupportedTypedSelenium
Sets a file input (upload) field to the file listed in fileLocator

Specified by:
attachFile in interface UnsupportedTypedSelenium
Parameters:
fieldLocator - an element locator
fileLocator - a URL pointing to the specified file. Before the file can be set in the input field (fieldLocator), Selenium RC may need to transfer the file to the local machine before attaching the file in a web page form. This is common in selenium grid configurations where the RC server driving the browser is not the same machine that started the test. Supported Browsers: Firefox ("*chrome") only.

attachFile

public void attachFile(ElementLocator<?> fieldLocator,
                       URL fileLocator)
Description copied from interface: UnsupportedTypedSelenium
Sets a file input (upload) field to the file listed in fileLocator

Specified by:
attachFile in interface UnsupportedTypedSelenium
Parameters:
fieldLocator - an element locator
fileLocator - a URL pointing to the specified file. Before the file can be set in the input field (fieldLocator), Selenium RC may need to transfer the file to the local machine before attaching the file in a web page form. This is common in selenium grid configurations where the RC server driving the browser is not the same machine that started the test. Supported Browsers: Firefox ("*chrome") only.

captureEntirePageScreenshot

public void captureEntirePageScreenshot(File filename)
Description copied from interface: UnsupportedTypedSelenium
Saves the entire contents of the current window canvas to a PNG file. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Currently this only works in Firefox when running in chrome mode, and in IE non-HTA using the EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly borrowed from the Screengrab! Firefox extension. Please see http://www.screengrab.org and http://snapsie.sourceforge.net/ for details.

Specified by:
captureEntirePageScreenshot in interface UnsupportedTypedSelenium
Parameters:
filename - the path to the file to persist the screenshot as. No filename extension will be appended by default. Directories will not be created if they do not exist, and an exception will be thrown, possibly by native code.

captureEntirePageScreenshot

public BufferedImage captureEntirePageScreenshot()
Specified by:
captureEntirePageScreenshot in interface TypedSelenium

captureNetworkTraffic

public NetworkTraffic captureNetworkTraffic(NetworkTrafficType type)
Specified by:
captureNetworkTraffic in interface TypedSelenium

captureScreenshot

public void captureScreenshot(File filename)
Description copied from interface: UnsupportedTypedSelenium
Captures a PNG screenshot to the specified file.

Specified by:
captureScreenshot in interface UnsupportedTypedSelenium
Parameters:
filename - the absolute path to the file to be written, e.g. "c:\blah\screenshot.png"

captureScreenshot

public BufferedImage captureScreenshot()
Specified by:
captureScreenshot in interface TypedSelenium

check

public void check(ElementLocator<?> elementLocator)
Specified by:
check in interface TypedSelenium

chooseCancelOnNextConfirmation

public void chooseCancelOnNextConfirmation()
Specified by:
chooseCancelOnNextConfirmation in interface TypedSelenium

chooseOkOnNextConfirmation

public void chooseOkOnNextConfirmation()
Specified by:
chooseOkOnNextConfirmation in interface TypedSelenium

click

public void click(ElementLocator<?> elementLocator)
Specified by:
click in interface TypedSelenium

clickAt

public void clickAt(ElementLocator<?> elementLocator,
                    Point point)
Specified by:
clickAt in interface TypedSelenium

close

public void close()
Specified by:
close in interface TypedSelenium

containsScript

public boolean containsScript(JavaScript javaScript)
Specified by:
containsScript in interface TypedSelenium

contextMenu

public void contextMenu(ElementLocator<?> elementLocator)
Specified by:
contextMenu in interface TypedSelenium

contextMenuAt

public void contextMenuAt(ElementLocator<?> elementLocator,
                          Point point)
Specified by:
contextMenuAt in interface TypedSelenium

controlKeyDown

public void controlKeyDown()
Specified by:
controlKeyDown in interface TypedSelenium

controlKeyUp

public void controlKeyUp()
Specified by:
controlKeyUp in interface TypedSelenium

deleteAllVisibleCookies

public void deleteAllVisibleCookies()
Specified by:
deleteAllVisibleCookies in interface TypedSelenium

deselectPopUp

public void deselectPopUp()
Specified by:
deselectPopUp in interface TypedSelenium

doubleClick

public void doubleClick(ElementLocator<?> elementLocator)
Specified by:
doubleClick in interface TypedSelenium

doubleClickAt

public void doubleClickAt(ElementLocator<?> elementLocator,
                          Point point)
Specified by:
doubleClickAt in interface TypedSelenium

dragAndDrop

public void dragAndDrop(ElementLocator<?> elementLocator,
                        Offset offset)
Specified by:
dragAndDrop in interface TypedSelenium

dragAndDropToObject

public void dragAndDropToObject(ElementLocator<?> elementLocatorOfObjectToBeDragged,
                                ElementLocator<?> elementLocatorOfDragDestinationObject)
Specified by:
dragAndDropToObject in interface TypedSelenium

fireEvent

public void fireEvent(ElementLocator<?> elementLocator,
                      Event event)
Specified by:
fireEvent in interface TypedSelenium

focus

public void focus(ElementLocator<?> elementLocator)
Specified by:
focus in interface TypedSelenium

getAlert

public String getAlert()
Specified by:
getAlert in interface TypedSelenium

getAllButtons

public List<ElementLocator<?>> getAllButtons()
Description copied from interface: UnsupportedTypedSelenium
Returns the IDs of all buttons on the page.

If a given button has no ID, it will appear as "" in this array.

Specified by:
getAllButtons in interface UnsupportedTypedSelenium
Returns:
the IDs of all buttons on the page

getAllFields

public List<ElementLocator<?>> getAllFields()
Description copied from interface: UnsupportedTypedSelenium
Returns the IDs of all input fields on the page.

If a given field has no ID, it will appear as "" in this array.

Specified by:
getAllFields in interface UnsupportedTypedSelenium
Returns:
the IDs of all field on the page

getAllLinks

public List<ElementLocator<?>> getAllLinks()
Description copied from interface: UnsupportedTypedSelenium
Returns the IDs of all links on the page.

If a given link has no ID, it will appear as "" in this array.

Specified by:
getAllLinks in interface UnsupportedTypedSelenium
Returns:
the IDs of all links on the page

getAllWindowIds

public List<WindowNameLocator> getAllWindowIds()
Specified by:
getAllWindowIds in interface TypedSelenium

getAllWindowNames

public List<String> getAllWindowNames()
Description copied from interface: UnsupportedTypedSelenium
Returns the names of all windows that the browser knows about.

Specified by:
getAllWindowNames in interface UnsupportedTypedSelenium
Returns:
the names of all windows that the browser knows about.

getAllWindowTitles

public List<String> getAllWindowTitles()
Description copied from interface: UnsupportedTypedSelenium
Returns the titles of all windows that the browser knows about.

Specified by:
getAllWindowTitles in interface UnsupportedTypedSelenium
Returns:
the titles of all windows that the browser knows about.

getAttribute

public String getAttribute(AttributeLocator<?> attributeLocator)
Specified by:
getAttribute in interface TypedSelenium

getAttribute

public String getAttribute(ElementLocator<?> elementLocator,
                           Attribute attribute)
Specified by:
getAttribute in interface TypedSelenium

getAttributeFromAllWindows

public List<String> getAttributeFromAllWindows(Attribute attribute)
Description copied from interface: UnsupportedTypedSelenium
Returns every instance of some attribute from all known windows.

Specified by:
getAttributeFromAllWindows in interface UnsupportedTypedSelenium
Parameters:
attribute - name of an attribute on the windows
Returns:
the set of values of this attribute from all known windows.

getBodyText

public String getBodyText()
Specified by:
getBodyText in interface TypedSelenium

getConfirmation

public String getConfirmation()
Specified by:
getConfirmation in interface TypedSelenium

getCount

public int getCount(IterableLocator<?> locator)
Specified by:
getCount in interface TypedSelenium

getCursorPosition

public int getCursorPosition(ElementLocator<?> elementLocator)
Specified by:
getCursorPosition in interface TypedSelenium

getElementDimension

public Dimension getElementDimension(ElementLocator<?> elementLocator)
Specified by:
getElementDimension in interface TypedSelenium

getElementHeight

public int getElementHeight(ElementLocator<?> elementLocator)
Specified by:
getElementHeight in interface TypedSelenium

getElementIndex

public int getElementIndex(ElementLocator<?> elementLocator)
Specified by:
getElementIndex in interface TypedSelenium

getElementPosition

public Point getElementPosition(ElementLocator<?> elementLocator)
Specified by:
getElementPosition in interface TypedSelenium

getElementPositionLeft

public int getElementPositionLeft(ElementLocator<?> elementLocator)
Specified by:
getElementPositionLeft in interface TypedSelenium

getElementPositionTop

public int getElementPositionTop(ElementLocator<?> elementLocator)
Specified by:
getElementPositionTop in interface TypedSelenium

getElementWidth

public int getElementWidth(ElementLocator<?> elementLocator)
Specified by:
getElementWidth in interface TypedSelenium

getEval

public String getEval(JavaScript script)
Specified by:
getEval in interface TypedSelenium

getExpression

public JavaScript getExpression(JavaScript expression)
Description copied from interface: UnsupportedTypedSelenium
Returns the specified expression.

This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.

Specified by:
getExpression in interface UnsupportedTypedSelenium
Parameters:
expression - the value to return
Returns:
the value passed in

getHtmlSource

public String getHtmlSource()
Specified by:
getHtmlSource in interface TypedSelenium

getLocation

public URL getLocation()
Specified by:
getLocation in interface TypedSelenium

getMouseSpeed

public int getMouseSpeed()
Specified by:
getMouseSpeed in interface TypedSelenium

getPrompt

public String getPrompt()
Specified by:
getPrompt in interface TypedSelenium

getSelectOptions

public List<String> getSelectOptions(ElementLocator<?> selectLocator)
Specified by:
getSelectOptions in interface TypedSelenium

getSelectedId

public String getSelectedId(ElementLocator<?> selectLocator)
Specified by:
getSelectedId in interface TypedSelenium

getSelectedIds

public List<String> getSelectedIds(ElementLocator<?> selectLocator)
Specified by:
getSelectedIds in interface TypedSelenium

getSelectedIndex

public int getSelectedIndex(ElementLocator<?> selectLocator)
Specified by:
getSelectedIndex in interface TypedSelenium

getSelectedIndexes

public List<Integer> getSelectedIndexes(ElementLocator<?> selectLocator)
Specified by:
getSelectedIndexes in interface TypedSelenium

getSelectedLabel

public String getSelectedLabel(ElementLocator<?> selectLocator)
Specified by:
getSelectedLabel in interface TypedSelenium

getSelectedLabels

public List<String> getSelectedLabels(ElementLocator<?> selectLocator)
Specified by:
getSelectedLabels in interface TypedSelenium

getSelectedValue

public String getSelectedValue(ElementLocator<?> selectLocator)
Specified by:
getSelectedValue in interface TypedSelenium

getSelectedValues

public List<String> getSelectedValues(ElementLocator<?> selectLocator)
Specified by:
getSelectedValues in interface TypedSelenium

getSpeed

public long getSpeed()
Specified by:
getSpeed in interface TypedSelenium

getText

public String getText(ElementLocator<?> elementLocator)
Specified by:
getText in interface TypedSelenium

getTitle

public String getTitle()
Specified by:
getTitle in interface TypedSelenium

getValue

public String getValue(ElementLocator<?> elementLocator)
Specified by:
getValue in interface TypedSelenium

getWhetherThisFrameMatchFrameExpression

public boolean getWhetherThisFrameMatchFrameExpression(String currentFrameString,
                                                       String target)
Description copied from interface: UnsupportedTypedSelenium
Determine whether current/locator identify the frame containing this running code.

This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" frame. In this case, when the test calls selectFrame, this routine is called for each frame to figure out which one has been selected. The selected frame will return true, while all others will return false.

Specified by:
getWhetherThisFrameMatchFrameExpression in interface UnsupportedTypedSelenium
Parameters:
currentFrameString - starting frame
target - new frame (which might be relative to the current one)
Returns:
true if the new frame is this code's window

getWhetherThisWindowMatchWindowExpression

public boolean getWhetherThisWindowMatchWindowExpression(String currentWindowString,
                                                         String target)
Description copied from interface: UnsupportedTypedSelenium
Determine whether currentWindowString plus target identify the window containing this running code.

This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" window. In this case, when the test calls selectWindow, this routine is called for each window to figure out which one has been selected. The selected window will return true, while all others will return false.

Specified by:
getWhetherThisWindowMatchWindowExpression in interface UnsupportedTypedSelenium
Parameters:
currentWindowString - starting window
target - new window (which might be relative to the current one, e.g., "_parent")
Returns:
true if the new window is this code's window

goBack

public void goBack()
Specified by:
goBack in interface TypedSelenium

highlight

public void highlight(ElementLocator<?> elementLocator)
Specified by:
highlight in interface TypedSelenium

ignoreAttributesWithoutValue

public void ignoreAttributesWithoutValue(boolean ignore)
Specified by:
ignoreAttributesWithoutValue in interface TypedSelenium

isAlertPresent

public boolean isAlertPresent()
Specified by:
isAlertPresent in interface TypedSelenium

isChecked

public boolean isChecked(ElementLocator<?> elementLocator)
Specified by:
isChecked in interface TypedSelenium

isConfirmationPresent

public boolean isConfirmationPresent()
Specified by:
isConfirmationPresent in interface TypedSelenium

isEditable

public boolean isEditable(ElementLocator<?> elementLocator)
Specified by:
isEditable in interface TypedSelenium

isElementPresent

public boolean isElementPresent(ElementLocator<?> elementLocator)
Specified by:
isElementPresent in interface TypedSelenium

isOrdered

public boolean isOrdered(ElementLocator<?> elementLocator1,
                         ElementLocator<?> elementLocator2)
Specified by:
isOrdered in interface TypedSelenium

isPromptPresent

public boolean isPromptPresent()
Specified by:
isPromptPresent in interface TypedSelenium

isSomethingSelected

public boolean isSomethingSelected(ElementLocator<?> selectLocator)
Specified by:
isSomethingSelected in interface TypedSelenium

isTextPresent

public boolean isTextPresent(String text)
Specified by:
isTextPresent in interface TypedSelenium

isVisible

public boolean isVisible(ElementLocator<?> elementLocator)
Specified by:
isVisible in interface TypedSelenium

keyDown

public void keyDown(ElementLocator<?> elementLocator,
                    char character)
Specified by:
keyDown in interface TypedSelenium

keyDown

public void keyDown(ElementLocator<?> elementLocator,
                    KeyCode keyCode)
Specified by:
keyDown in interface TypedSelenium

keyDownNative

public void keyDownNative(int keycode)
Specified by:
keyDownNative in interface TypedSelenium

keyPress

public void keyPress(ElementLocator<?> elementLocator,
                     char character)
Specified by:
keyPress in interface TypedSelenium

keyPress

public void keyPress(ElementLocator<?> elementLocator,
                     KeyCode keyCode)
Specified by:
keyPress in interface TypedSelenium

keyPressNative

public void keyPressNative(int keycode)
Specified by:
keyPressNative in interface TypedSelenium

keyUp

public void keyUp(ElementLocator<?> elementLocator,
                  char character)
Specified by:
keyUp in interface TypedSelenium

keyUp

public void keyUp(ElementLocator<?> elementLocator,
                  KeyCode keyCode)
Specified by:
keyUp in interface TypedSelenium

keyUpNative

public void keyUpNative(int keycode)
Specified by:
keyUpNative in interface TypedSelenium

logToBrowser

public void logToBrowser(String textToLog)
Specified by:
logToBrowser in interface TypedSelenium

metaKeyDown

public void metaKeyDown()
Specified by:
metaKeyDown in interface TypedSelenium

metaKeyUp

public void metaKeyUp()
Specified by:
metaKeyUp in interface TypedSelenium

mouseDown

public void mouseDown(ElementLocator<?> elementLocator)
Specified by:
mouseDown in interface TypedSelenium

mouseDownAt

public void mouseDownAt(ElementLocator<?> elementLocator,
                        Point point)
Specified by:
mouseDownAt in interface TypedSelenium

mouseDownRight

public void mouseDownRight(ElementLocator<?> elementLocator)
Specified by:
mouseDownRight in interface TypedSelenium

mouseDownRightAt

public void mouseDownRightAt(ElementLocator<?> elementLocator,
                             Point point)
Specified by:
mouseDownRightAt in interface TypedSelenium

mouseMove

public void mouseMove(ElementLocator<?> elementLocator)
Specified by:
mouseMove in interface TypedSelenium

mouseMoveAt

public void mouseMoveAt(ElementLocator<?> elementLocator,
                        Point point)
Specified by:
mouseMoveAt in interface TypedSelenium

mouseOut

public void mouseOut(ElementLocator<?> elementLocator)
Specified by:
mouseOut in interface TypedSelenium

mouseOver

public void mouseOver(ElementLocator<?> elementLocator)
Specified by:
mouseOver in interface TypedSelenium

mouseUp

public void mouseUp(ElementLocator<?> elementLocator)
Specified by:
mouseUp in interface TypedSelenium

mouseUpAt

public void mouseUpAt(ElementLocator<?> elementLocator,
                      Point point)
Specified by:
mouseUpAt in interface TypedSelenium

mouseUpRight

public void mouseUpRight(ElementLocator<?> elementLocator)
Specified by:
mouseUpRight in interface TypedSelenium

mouseUpRightAt

public void mouseUpRightAt(ElementLocator<?> elementLocator,
                           Point point)
Specified by:
mouseUpRightAt in interface TypedSelenium

open

public void open(URL url)
Specified by:
open in interface TypedSelenium

openWindow

public void openWindow(URL url,
                       WindowNameLocator windowName)
Specified by:
openWindow in interface TypedSelenium

refresh

public void refresh()
Specified by:
refresh in interface TypedSelenium

removeAllSelections

public void removeAllSelections(ElementLocator<?> elementLocator)
Specified by:
removeAllSelections in interface TypedSelenium

removeScript

public void removeScript(JavaScript javaScript)
Specified by:
removeScript in interface TypedSelenium

removeSelection

public void removeSelection(ElementLocator<?> elementLocator,
                            OptionLocator<?> optionLocator)
Specified by:
removeSelection in interface TypedSelenium

retrieveLastRemoteControlLogs

public String retrieveLastRemoteControlLogs()
Specified by:
retrieveLastRemoteControlLogs in interface TypedSelenium

runScript

public void runScript(JavaScript script)
Specified by:
runScript in interface TypedSelenium

select

public void select(ElementLocator<?> selectLocator,
                   OptionLocator<?> optionLocator)
Specified by:
select in interface TypedSelenium

selectFrame

public void selectFrame(FrameLocator<?> frameLocator)
Specified by:
selectFrame in interface TypedSelenium

selectPopUp

public void selectPopUp(WindowLocator<?> windowLocator)
Specified by:
selectPopUp in interface TypedSelenium

selectWindow

public void selectWindow(WindowLocator<?> windowLocator)
Specified by:
selectWindow in interface TypedSelenium

setBrowserLogLevel

public void setBrowserLogLevel(LogLevel logLevel)
Specified by:
setBrowserLogLevel in interface TypedSelenium

setCursorPosition

public void setCursorPosition(ElementLocator<?> elementLocator,
                              int position)
Specified by:
setCursorPosition in interface TypedSelenium

setExtensionJs

public void setExtensionJs(JavaScript extensionJs)
Description copied from interface: UnsupportedTypedSelenium
Sets the per-session extension Javascript

Specified by:
setExtensionJs in interface UnsupportedTypedSelenium

setMouseSpeed

public void setMouseSpeed(int pixels)
Specified by:
setMouseSpeed in interface TypedSelenium

setSpeed

public void setSpeed(long speedInMilis)
Specified by:
setSpeed in interface TypedSelenium

setTimeout

public void setTimeout(long timeoutInMilis)
Specified by:
setTimeout in interface TypedSelenium

shiftKeyDown

public void shiftKeyDown()
Specified by:
shiftKeyDown in interface TypedSelenium

shiftKeyUp

public void shiftKeyUp()
Specified by:
shiftKeyUp in interface TypedSelenium

shutDownSeleniumServer

public void shutDownSeleniumServer()
Specified by:
shutDownSeleniumServer in interface TypedSelenium

start

public void start()
Specified by:
start in interface TypedSelenium

stop

public void stop()
Specified by:
stop in interface TypedSelenium

submit

public void submit(ElementLocator<?> formLocator)
Specified by:
submit in interface TypedSelenium

type

public void type(ElementLocator<?> elementLocator,
                 String value)
Specified by:
type in interface TypedSelenium

typeKeys

public void typeKeys(ElementLocator<?> elementLocator,
                     String value)
Specified by:
typeKeys in interface TypedSelenium

uncheck

public void uncheck(ElementLocator<?> elementLocator)
Specified by:
uncheck in interface TypedSelenium

useXpathLibrary

public void useXpathLibrary(XPathLibrary xPathLibrary)
Specified by:
useXpathLibrary in interface TypedSelenium

waitForCondition

public void waitForCondition(JavaScript script)
Specified by:
waitForCondition in interface TypedSelenium

waitForCondition

public void waitForCondition(JavaScript script,
                             long timeout)
Specified by:
waitForCondition in interface TypedSelenium

waitForFrameToLoad

public void waitForFrameToLoad(URL frameURL)
Specified by:
waitForFrameToLoad in interface TypedSelenium

waitForFrameToLoad

public void waitForFrameToLoad(URL frameURL,
                               long timeout)
Specified by:
waitForFrameToLoad in interface TypedSelenium

waitForPageToLoad

public void waitForPageToLoad()
Specified by:
waitForPageToLoad in interface TypedSelenium

waitForPageToLoad

public void waitForPageToLoad(long timeout)
Specified by:
waitForPageToLoad in interface TypedSelenium

waitForPopUp

public void waitForPopUp(WindowNameLocator windowNameLocator,
                         long timeoutInMilis)
Specified by:
waitForPopUp in interface TypedSelenium

windowFocus

public void windowFocus()
Specified by:
windowFocus in interface TypedSelenium

windowMaximize

public void windowMaximize()
Specified by:
windowMaximize in interface TypedSelenium

getAllCookies

public Set<Cookie> getAllCookies()
Specified by:
getAllCookies in interface TypedSelenium

getCookieByName

public Cookie getCookieByName(String cookieName)
Specified by:
getCookieByName in interface TypedSelenium

isCookiePresent

public boolean isCookiePresent(String cookieName)
Specified by:
isCookiePresent in interface TypedSelenium

createCookie

public CookieCreateOptions createCookie(Cookie cookie)
Specified by:
createCookie in interface TypedSelenium

createCookie

public void createCookie(Cookie cookie,
                         CookieCreateOptions options)
Specified by:
createCookie in interface TypedSelenium

deleteCookie

public void deleteCookie(String cookieName,
                         CookieDeleteOptions options)
Specified by:
deleteCookie in interface TypedSelenium

addCustomRequestHeader

public void addCustomRequestHeader(RequestHeader header)
Specified by:
addCustomRequestHeader in interface TypedSelenium

Graphene Implementation 1.0.0.CR3

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.