|
Ajocado Implementation 1.0.0.Alpha2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.arquillian.ajocado.framework.TypedSeleniumImpl
public class TypedSeleniumImpl
Wrapper implementation for Selenium object's API to make it type-safe.
| 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()
|
void |
createCookie(Cookie cookie)
|
void |
createCookie(Cookie cookie,
CreateCookieOptions options)
|
void |
deleteAllVisibleCookies()
|
void |
deleteCookie(String cookieName,
DeleteCookieOptions 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 |
dragdrop(ElementLocator<?> elementLocator,
Offset offset)
|
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<WindowId> |
getAllWindowIds()
Returns the IDs of all windows that the browser knows about. |
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)
|
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(Frame currentFrame,
Frame targetFrame)
Determine whether current/locator identify the frame containing this running code. |
boolean |
getWhetherThisWindowMatchWindowExpression(Window currentWindowString,
Window 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,
String keySequence)
|
void |
keyDownNative(String keycode)
|
void |
keyPress(ElementLocator<?> elementLocator,
String keySequence)
|
void |
keyPressNative(String keycode)
|
void |
keyUp(ElementLocator<?> elementLocator,
String keySequence)
|
void |
keyUpNative(String 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,
WindowId windowID)
Opens a popup window (if a window with that ID isn't already open). |
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(WindowId windowID)
Simplifies the process of selecting a popup window (and does not offer functionality beyond what selectWindow() already provides). |
void |
selectWindow(WindowId windowID)
Selects a popup window using a window locator; once a popup window has been selected, all commands go to that window. |
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(WindowId windowId,
long timeoutInMilis)
Waits for a popup window to appear and load up. |
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 TypedSeleniumImpl()
| Method Detail |
|---|
public void addLocationStrategy(ElementLocationStrategy locationStrategy,
JavaScript strategyDefinition)
addLocationStrategy in interface TypedSeleniumpublic void addScript(JavaScript javaScript)
addScript in interface TypedSelenium
public void addSelection(ElementLocator<?> elementLocator,
OptionLocator<?> optionLocator)
addSelection in interface TypedSeleniumpublic void allowNativeXpath(boolean allow)
allowNativeXpath in interface TypedSeleniumpublic void altKeyDown()
altKeyDown in interface TypedSeleniumpublic void altKeyUp()
altKeyUp in interface TypedSeleniumpublic void answerOnNextPrompt(String answer)
answerOnNextPrompt in interface TypedSelenium
public IdLocator assignId(ElementLocator<?> elementLocator,
String identifier)
assignId in interface TypedSelenium
public void attachFile(ElementLocator<?> fieldLocator,
File fileLocator)
UnsupportedTypedSelenium
attachFile in interface UnsupportedTypedSeleniumfieldLocator - an element locatorfileLocator - 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.
public void attachFile(ElementLocator<?> fieldLocator,
URL fileLocator)
UnsupportedTypedSelenium
attachFile in interface UnsupportedTypedSeleniumfieldLocator - an element locatorfileLocator - 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.public void captureEntirePageScreenshot(File filename)
UnsupportedTypedSelenium
captureEntirePageScreenshot in interface UnsupportedTypedSeleniumfilename - 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.public BufferedImage captureEntirePageScreenshot()
captureEntirePageScreenshot in interface TypedSeleniumpublic NetworkTraffic captureNetworkTraffic(NetworkTrafficType type)
captureNetworkTraffic in interface TypedSeleniumpublic void captureScreenshot(File filename)
UnsupportedTypedSelenium
captureScreenshot in interface UnsupportedTypedSeleniumfilename - the absolute path to the file to be written, e.g. "c:\blah\screenshot.png"public BufferedImage captureScreenshot()
captureScreenshot in interface TypedSeleniumpublic void check(ElementLocator<?> elementLocator)
check in interface TypedSeleniumpublic void chooseCancelOnNextConfirmation()
chooseCancelOnNextConfirmation in interface TypedSeleniumpublic void chooseOkOnNextConfirmation()
chooseOkOnNextConfirmation in interface TypedSeleniumpublic void click(ElementLocator<?> elementLocator)
click in interface TypedSelenium
public void clickAt(ElementLocator<?> elementLocator,
Point point)
clickAt in interface TypedSeleniumpublic void close()
close in interface TypedSeleniumpublic boolean containsScript(JavaScript javaScript)
containsScript in interface TypedSeleniumpublic void contextMenu(ElementLocator<?> elementLocator)
contextMenu in interface TypedSelenium
public void contextMenuAt(ElementLocator<?> elementLocator,
Point point)
contextMenuAt in interface TypedSeleniumpublic void controlKeyDown()
controlKeyDown in interface TypedSeleniumpublic void controlKeyUp()
controlKeyUp in interface TypedSeleniumpublic void deleteAllVisibleCookies()
deleteAllVisibleCookies in interface TypedSeleniumpublic void deselectPopUp()
deselectPopUp in interface TypedSeleniumpublic void doubleClick(ElementLocator<?> elementLocator)
doubleClick in interface TypedSelenium
public void doubleClickAt(ElementLocator<?> elementLocator,
Point point)
doubleClickAt in interface TypedSelenium
public void dragAndDrop(ElementLocator<?> elementLocator,
Offset offset)
dragAndDrop in interface TypedSelenium
public void dragAndDropToObject(ElementLocator<?> elementLocatorOfObjectToBeDragged,
ElementLocator<?> elementLocatorOfDragDestinationObject)
dragAndDropToObject in interface TypedSelenium
public void dragdrop(ElementLocator<?> elementLocator,
Offset offset)
dragdrop in interface TypedSelenium
public void fireEvent(ElementLocator<?> elementLocator,
Event event)
fireEvent in interface TypedSeleniumpublic void focus(ElementLocator<?> elementLocator)
focus in interface TypedSeleniumpublic String getAlert()
getAlert in interface TypedSeleniumpublic List<ElementLocator<?>> getAllButtons()
UnsupportedTypedSeleniumIf a given button has no ID, it will appear as "" in this array.
getAllButtons in interface UnsupportedTypedSeleniumpublic List<ElementLocator<?>> getAllFields()
UnsupportedTypedSeleniumIf a given field has no ID, it will appear as "" in this array.
getAllFields in interface UnsupportedTypedSeleniumpublic List<ElementLocator<?>> getAllLinks()
UnsupportedTypedSeleniumIf a given link has no ID, it will appear as "" in this array.
getAllLinks in interface UnsupportedTypedSeleniumpublic List<WindowId> getAllWindowIds()
UnsupportedTypedSelenium
getAllWindowIds in interface UnsupportedTypedSeleniumpublic List<String> getAllWindowNames()
UnsupportedTypedSelenium
getAllWindowNames in interface UnsupportedTypedSeleniumpublic List<String> getAllWindowTitles()
UnsupportedTypedSelenium
getAllWindowTitles in interface UnsupportedTypedSeleniumpublic String getAttribute(AttributeLocator<?> attributeLocator)
getAttribute in interface TypedSeleniumpublic List<String> getAttributeFromAllWindows(Attribute attribute)
UnsupportedTypedSelenium
getAttributeFromAllWindows in interface UnsupportedTypedSeleniumattribute - name of an attribute on the windows
public String getBodyText()
getBodyText in interface TypedSeleniumpublic String getConfirmation()
getConfirmation in interface TypedSeleniumpublic int getCount(IterableLocator<?> locator)
getCount in interface TypedSeleniumpublic int getCursorPosition(ElementLocator<?> elementLocator)
getCursorPosition in interface TypedSeleniumpublic Dimension getElementDimension(ElementLocator<?> elementLocator)
getElementDimension in interface TypedSeleniumpublic int getElementHeight(ElementLocator<?> elementLocator)
getElementHeight in interface TypedSeleniumpublic int getElementIndex(ElementLocator<?> elementLocator)
getElementIndex in interface TypedSeleniumpublic Point getElementPosition(ElementLocator<?> elementLocator)
getElementPosition in interface TypedSeleniumpublic int getElementPositionLeft(ElementLocator<?> elementLocator)
getElementPositionLeft in interface TypedSeleniumpublic int getElementPositionTop(ElementLocator<?> elementLocator)
getElementPositionTop in interface TypedSeleniumpublic int getElementWidth(ElementLocator<?> elementLocator)
getElementWidth in interface TypedSeleniumpublic String getEval(JavaScript script)
getEval in interface TypedSeleniumpublic JavaScript getExpression(JavaScript expression)
UnsupportedTypedSeleniumThis is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
getExpression in interface UnsupportedTypedSeleniumexpression - the value to return
public String getHtmlSource()
getHtmlSource in interface TypedSeleniumpublic URL getLocation()
getLocation in interface TypedSeleniumpublic int getMouseSpeed()
getMouseSpeed in interface TypedSeleniumpublic String getPrompt()
getPrompt in interface TypedSeleniumpublic List<String> getSelectOptions(ElementLocator<?> selectLocator)
getSelectOptions in interface TypedSeleniumpublic String getSelectedId(ElementLocator<?> selectLocator)
getSelectedId in interface TypedSeleniumpublic List<String> getSelectedIds(ElementLocator<?> selectLocator)
getSelectedIds in interface TypedSeleniumpublic int getSelectedIndex(ElementLocator<?> selectLocator)
getSelectedIndex in interface TypedSeleniumpublic List<Integer> getSelectedIndexes(ElementLocator<?> selectLocator)
getSelectedIndexes in interface TypedSeleniumpublic String getSelectedLabel(ElementLocator<?> selectLocator)
getSelectedLabel in interface TypedSeleniumpublic List<String> getSelectedLabels(ElementLocator<?> selectLocator)
getSelectedLabels in interface TypedSeleniumpublic String getSelectedValue(ElementLocator<?> selectLocator)
getSelectedValue in interface TypedSeleniumpublic List<String> getSelectedValues(ElementLocator<?> selectLocator)
getSelectedValues in interface TypedSeleniumpublic long getSpeed()
getSpeed in interface TypedSeleniumpublic String getText(ElementLocator<?> elementLocator)
getText in interface TypedSeleniumpublic String getTitle()
getTitle in interface TypedSeleniumpublic String getValue(ElementLocator<?> elementLocator)
getValue in interface TypedSelenium
public boolean getWhetherThisFrameMatchFrameExpression(Frame currentFrame,
Frame targetFrame)
UnsupportedTypedSeleniumThis 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.
getWhetherThisFrameMatchFrameExpression in interface UnsupportedTypedSeleniumcurrentFrame - starting frametargetFrame - new frame (which might be relative to the current one)
public boolean getWhetherThisWindowMatchWindowExpression(Window currentWindowString,
Window target)
UnsupportedTypedSeleniumThis 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.
getWhetherThisWindowMatchWindowExpression in interface UnsupportedTypedSeleniumcurrentWindowString - starting windowtarget - new window (which might be relative to the current one, e.g., "_parent")
public void goBack()
goBack in interface TypedSeleniumpublic void highlight(ElementLocator<?> elementLocator)
highlight in interface TypedSeleniumpublic void ignoreAttributesWithoutValue(boolean ignore)
ignoreAttributesWithoutValue in interface TypedSeleniumpublic boolean isAlertPresent()
isAlertPresent in interface TypedSeleniumpublic boolean isChecked(ElementLocator<?> elementLocator)
isChecked in interface TypedSeleniumpublic boolean isConfirmationPresent()
isConfirmationPresent in interface TypedSeleniumpublic boolean isEditable(ElementLocator<?> elementLocator)
isEditable in interface TypedSeleniumpublic boolean isElementPresent(ElementLocator<?> elementLocator)
isElementPresent in interface TypedSelenium
public boolean isOrdered(ElementLocator<?> elementLocator1,
ElementLocator<?> elementLocator2)
isOrdered in interface TypedSeleniumpublic boolean isPromptPresent()
isPromptPresent in interface TypedSeleniumpublic boolean isSomethingSelected(ElementLocator<?> selectLocator)
isSomethingSelected in interface TypedSeleniumpublic boolean isTextPresent(String text)
isTextPresent in interface TypedSeleniumpublic boolean isVisible(ElementLocator<?> elementLocator)
isVisible in interface TypedSelenium
public void keyDown(ElementLocator<?> elementLocator,
String keySequence)
keyDown in interface TypedSeleniumpublic void keyDownNative(String keycode)
keyDownNative in interface TypedSelenium
public void keyPress(ElementLocator<?> elementLocator,
String keySequence)
keyPress in interface TypedSeleniumpublic void keyPressNative(String keycode)
keyPressNative in interface TypedSelenium
public void keyUp(ElementLocator<?> elementLocator,
String keySequence)
keyUp in interface TypedSeleniumpublic void keyUpNative(String keycode)
keyUpNative in interface TypedSeleniumpublic void logToBrowser(String textToLog)
logToBrowser in interface TypedSeleniumpublic void metaKeyDown()
metaKeyDown in interface TypedSeleniumpublic void metaKeyUp()
metaKeyUp in interface TypedSeleniumpublic void mouseDown(ElementLocator<?> elementLocator)
mouseDown in interface TypedSelenium
public void mouseDownAt(ElementLocator<?> elementLocator,
Point point)
mouseDownAt in interface TypedSeleniumpublic void mouseDownRight(ElementLocator<?> elementLocator)
mouseDownRight in interface TypedSelenium
public void mouseDownRightAt(ElementLocator<?> elementLocator,
Point point)
mouseDownRightAt in interface TypedSeleniumpublic void mouseMove(ElementLocator<?> elementLocator)
mouseMove in interface TypedSelenium
public void mouseMoveAt(ElementLocator<?> elementLocator,
Point point)
mouseMoveAt in interface TypedSeleniumpublic void mouseOut(ElementLocator<?> elementLocator)
mouseOut in interface TypedSeleniumpublic void mouseOver(ElementLocator<?> elementLocator)
mouseOver in interface TypedSeleniumpublic void mouseUp(ElementLocator<?> elementLocator)
mouseUp in interface TypedSelenium
public void mouseUpAt(ElementLocator<?> elementLocator,
Point point)
mouseUpAt in interface TypedSeleniumpublic void mouseUpRight(ElementLocator<?> elementLocator)
mouseUpRight in interface TypedSelenium
public void mouseUpRightAt(ElementLocator<?> elementLocator,
Point point)
mouseUpRightAt in interface TypedSeleniumpublic void open(URL url)
open in interface TypedSelenium
public void openWindow(URL url,
WindowId windowID)
UnsupportedTypedSeleniumThis command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").
openWindow in interface UnsupportedTypedSeleniumurl - the URL to open, which can be blankwindowID - the JavaScript window ID of the window to selectpublic void refresh()
refresh in interface TypedSeleniumpublic void removeAllSelections(ElementLocator<?> elementLocator)
removeAllSelections in interface TypedSeleniumpublic void removeScript(JavaScript javaScript)
removeScript in interface TypedSelenium
public void removeSelection(ElementLocator<?> elementLocator,
OptionLocator<?> optionLocator)
removeSelection in interface TypedSeleniumpublic String retrieveLastRemoteControlLogs()
retrieveLastRemoteControlLogs in interface TypedSeleniumpublic void runScript(JavaScript script)
runScript in interface TypedSelenium
public void select(ElementLocator<?> selectLocator,
OptionLocator<?> optionLocator)
select in interface TypedSeleniumpublic void selectFrame(FrameLocator frameLocator)
selectFrame in interface TypedSeleniumpublic void selectPopUp(WindowId windowID)
UnsupportedTypedSeleniumselectWindow() already provides).
windowID is either not specified, or specified as "null", the first non-top window is
selected. The top window is the one that would be selected by selectWindow() without providing a
windowID . This should not be used when more than one popup window is in play.windowID as the following in order: 1) the
"name" of the window, as specified to window.open(); 2) a javascript variable which is a reference
to a window; and 3) the title of the window. This is the same ordered lookup performed by
selectWindow .
selectPopUp in interface UnsupportedTypedSeleniumwindowID - an identifier for the popup window, which can take on a number of different meaningspublic void selectWindow(WindowId windowID)
UnsupportedTypedSeleniumWindow locators provide different ways of specifying the window object: by title, by internal JavaScript "name," or by JavaScript variable.
If no window locator prefix is provided, we'll try to guess what you mean like this:
1.) if windowID is null, (or the string "null") then it is assumed the user is referring to the original window instantiated by the browser).
2.) if the value of the "windowID" parameter is a JavaScript variable name in the current application window, then it is assumed that this variable contains the return value from a call to the JavaScript window.open() method.
3.) Otherwise, selenium looks in a hash it maintains that maps string names to window "names".
4.) If that fails, we'll try looping over all of the known windows to try to find the appropriate "title". Since "title" is not necessarily unique, this may have unexpected behavior.
If you're having trouble figuring out the name of a window that you want to manipulate, look at the Selenium log messages which identify the names of windows created via window.open (and therefore intercepted by Selenium). You will see messages like the following for each window as it is opened:
debug: window.open call intercepted; window ID (which you can use with selectWindow()) is
"myNewWindow"
In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). (This is bug SEL-339.) In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").
selectWindow in interface UnsupportedTypedSeleniumwindowID - the JavaScript window ID of the window to selectpublic void setBrowserLogLevel(LogLevel logLevel)
setBrowserLogLevel in interface TypedSelenium
public void setCursorPosition(ElementLocator<?> elementLocator,
int position)
setCursorPosition in interface TypedSeleniumpublic void setExtensionJs(JavaScript extensionJs)
UnsupportedTypedSelenium
setExtensionJs in interface UnsupportedTypedSeleniumpublic void setMouseSpeed(int pixels)
setMouseSpeed in interface TypedSeleniumpublic void setSpeed(long speedInMilis)
setSpeed in interface TypedSeleniumpublic void setTimeout(long timeoutInMilis)
setTimeout in interface TypedSeleniumpublic void shiftKeyDown()
shiftKeyDown in interface TypedSeleniumpublic void shiftKeyUp()
shiftKeyUp in interface TypedSeleniumpublic void shutDownSeleniumServer()
shutDownSeleniumServer in interface TypedSeleniumpublic void start()
start in interface TypedSeleniumpublic void stop()
stop in interface TypedSeleniumpublic void submit(ElementLocator<?> formLocator)
submit in interface TypedSelenium
public void type(ElementLocator<?> elementLocator,
String value)
type in interface TypedSelenium
public void typeKeys(ElementLocator<?> elementLocator,
String value)
typeKeys in interface TypedSeleniumpublic void uncheck(ElementLocator<?> elementLocator)
uncheck in interface TypedSeleniumpublic void useXpathLibrary(XpathLibrary xpathLibrary)
useXpathLibrary in interface TypedSeleniumpublic void waitForCondition(JavaScript script)
waitForCondition in interface TypedSelenium
public void waitForCondition(JavaScript script,
long timeout)
waitForCondition in interface TypedSeleniumpublic void waitForFrameToLoad(URL frameURL)
waitForFrameToLoad in interface TypedSelenium
public void waitForFrameToLoad(URL frameURL,
long timeout)
waitForFrameToLoad in interface TypedSeleniumpublic void waitForPageToLoad()
waitForPageToLoad in interface TypedSeleniumpublic void waitForPageToLoad(long timeout)
waitForPageToLoad in interface TypedSelenium
public void waitForPopUp(WindowId windowId,
long timeoutInMilis)
UnsupportedTypedSelenium
waitForPopUp in interface UnsupportedTypedSeleniumwindowId - the JavaScript window "name" of the window that will appear (not the text of the title bar) If
unspecified, or specified as "null", this command will wait for the first non-top window to appear
(don't rely on this if you are working with multiple popups simultaneously).timeoutInMilis - a timeout in milliseconds, after which the action will return with an error. If this value is not
specified, the default Selenium timeout will be used. See the setTimeout() command.public void windowFocus()
windowFocus in interface TypedSeleniumpublic void windowMaximize()
windowMaximize in interface TypedSeleniumpublic Set<Cookie> getAllCookies()
getAllCookies in interface TypedSeleniumpublic Cookie getCookieByName(String cookieName)
getCookieByName in interface TypedSeleniumpublic boolean isCookiePresent(String cookieName)
isCookiePresent in interface TypedSeleniumpublic void createCookie(Cookie cookie)
createCookie in interface TypedSelenium
public void createCookie(Cookie cookie,
CreateCookieOptions options)
createCookie in interface TypedSelenium
public void deleteCookie(String cookieName,
DeleteCookieOptions options)
deleteCookie in interface TypedSeleniumpublic void addCustomRequestHeader(RequestHeader header)
addCustomRequestHeader in interface TypedSelenium
|
Ajocado Implementation 1.0.0.Alpha2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||