Selenium Command Language Reference (Selenese)
Selenium
implements a domain specific language (DSL) named Selenese. PushToTest
implements the SeleniumHtmlUnit object library in TestMaker to operate
Selenese commands in HtmlUnit. Here is a reference to the Selenese
commands and a list of unumplemented Selenese commands in
SeleniumHtmlUnit.
Selenium Command Reference
The following is a reference to all of the Selenese commands.
| Command | Wait Command | Target | Value |
| Selenium Control | |||
| setTimeout | milliseconds | ||
| setMouseSpeed | number of pixels | ||
| setMouseSpeedAndWait | |||
| setSpeed | milliseconds | ||
| setSpeedAndWait | |||
| addLocationStrategy | strategyName | functionDef | |
| addLocationStrategyandWait | |||
| allowNativeXpath | boolean | ||
| allowNativeXpathAndWait | |||
| ignoreAttributesWithoutValue | boolean | ||
| ignoreAttributesWithoutValueAndWait | |||
| assignId | locator | identifier | |
| assignIdAndWait | |||
| captureEntirePageScreenShot | filename, kwargs | ||
| captureEntirePageScreenShotAndWait | |||
| echo | message | ||
| pause | milliseconds | ||
| runScript | javascript | ||
| runScriptAndWait | |||
| waitForCondition | javascript | milliseconds | |
| waitForPageToLoad | milliseconds | ||
| waitForPopUp | windowID | milliseconds | |
| fireEvent | locator | eventName | |
| fireEventAndWait | |||
| Browser Operations | |||
| open | url | ||
| openAndWait | |||
| openWindow | url | windowID | |
| openWindowAndWait | |||
| goBack | |||
| goBackAndWait | |||
| refresh | |||
| refreshAndWait | |||
| close | |||
| deleteCookie | name | path | |
| deleteCookieandWait | |||
| deleteAllVisibleCookies | |||
| deleteAllVisibleCookiesAndWait | |||
| setBrowserLogLevel | logLevel | ||
| setBrowserLogLevelAndWait | |||
| Cookie Operations | |||
| createCookie | nameValuePair | optionString | |
| createCookieAndWait | |||
| deleteCookie | name | optionString | |
| deleteCookieAndWait | |||
| deleteAllVisibleCookies | |||
| deleteAllVisibleCookiesAndWait | |||
| Popup Box Operations | |||
| answerOnNextPrompt | answer | ||
| answerOnNextPromptAndWait | |||
| chooseCancelOnNextConfirmation | |||
| chooseCancelOnNextConfirmationAndWait | |||
| chooseOkOnNextConfirmation | |||
| chooseOkOnNextConfirmationAndWait | |||
| Checkbox & Radio Buttons | |||
| check | locator | ||
| checkAndWait | |||
| uncheck | locator | ||
| uncheckAndWait | |||
| Lists & Dropdowns | |||
| addSelection | locator | optionLocator | |
| addSelectionAndWait | |||
| removeSelection | |||
| removeSelectionAndWait | locator | optionLocator | |
| removeAllSelections | |||
| removeAllSelectionsAndWait | locator | ||
| Edit Fields | |||
| type | locator | value | |
| typeAndWait | |||
| typeKeys | locator | value | |
| typeKeysAndWait | |||
| setCursorPosition | locator | position | |
| setCursorPositionAndWait | |||
| Keyboard Operations | |||
| keyDown | locator | keySequence | |
| keyDownAndWait | |||
| keyPress | locator | keySequence | |
| keyPressAndWait | |||
| keyUp | locator | keySequence | |
| keyUpAndWait | |||
| altKeyDown | |||
| altKeyDownAndWait | |||
| altKeyUp | |||
| altKeyUpAndWait | |||
| controlKeyDown | |||
| controlKeyDownAndWait | |||
| controlKeyUp | |||
| controlKeyUpAndWait | |||
| metaKeyDown | |||
| metaKeyDownAndWait | |||
| metaKeyUp | |||
| metaKeyUpAndWait | |||
| shiftKeyDown | |||
| shiftKeyDownAndWait | |||
| shiftKeyUp | |||
| shiftKeyUpAndWait | |||
| Mouse Operations | |||
| click | locator | ||
| clickAndWait | |||
| clickAt | locator | coordString | |
| clickAtAndWait | |||
| doubleClick | locator | ||
| doubleClickAndWait | |||
| doubleClickAt | locator | coordString | |
| doubleClickAtAndWait | |||
| contextMenu | locator | ||
| contextMenuAndWait | |||
| contextMenuAt | locator | coordString | |
| contextMenuAtAndWait | |||
| mouseDown | locator | ||
| mouseDownAndWait | |||
| mouseDownA | locator | coordString | |
| mouseDownAtAndWait | |||
| mouseMove | locator | ||
| mouseMoveAndWait | |||
| mouseMoveAt | locator | coordString | |
| mouseMoveAtAndWait | |||
| mouseOut | locator | ||
| mouseOutAndWait | |||
| mouseOver | locator | coordString | |
| mouseOverAndWait | |||
| mouseUp | locator | ||
| mouseUpAndWait | |||
| mouseUpAt | locator | coordString | |
| mouseUpAtAndWait | |||
| dragAndDrop | locator | movementString | |
| dragAndDropAndWait | |||
| dragAndDropToObject | sourceLocator | destLocator | |
| dragAndDropToObjectAndWait | |||
| Form Operations | |||
| submit | formLocator | ||
| submitAndWait | |||
| Windows/Element Selection | |||
| select | locator | optionLocator | |
| select AndWait | |||
| selectFrame | locator | ||
| selectWindow | windowID | ||
| focus | locator | ||
| focusAndWait | |||
| highlight | locator | ||
| highlightAndWait | |||
| windowFocus | |||
| windowFocus AndWait | |||
| windowMaximize | |||
| windowMaximizeAndWait | |||
| Selenium Accessors | |||
| store | expression | variableName | |
| storeAlert | variableName | ||
| assertAlert | pattern | ||
| assertNotAlert | pattern | ||
| verifyAlert | pattern | ||
| verifyNotAlert | pattern | ||
| waitForAlert | pattern | ||
| waitForNotAlert | pattern | ||
| storeAlertPresent | variableName | ||
| assertAlertPresent | pattern | ||
| assertNotAlert Present | pattern | ||
| verifyAlertPresent | pattern | ||
| verifyNotAlertPresent | pattern | ||
| waitForAlertPresent | pattern | ||
| waitForNotAlertPresent | pattern | ||
| storeAllButtons | variableName | ||
| assertAllButtons | pattern | ||
| assertNotAllButtons | pattern | ||
| verifyAllButtons | pattern | ||
| verifyNotAllButtons | pattern | ||
| waitForAllButtons | pattern | ||
| waitForNotAllButtons | pattern | ||
| storeAllFields | variableName | ||
| assertAllFields | pattern | ||
| assertNotAllFields | pattern | ||
| verifyAllFields | pattern | ||
| verifyNotAllFields | pattern | ||
| waitForAllFields | pattern | ||
| waitForNotAllFields | pattern | ||
| storeAllLinks | variableName | ||
| assertAllLinks | pattern | ||
| assertNotAllLinks | pattern | ||
| verifyAllLinks | pattern | ||
| verifyNotAllLinks | pattern | ||
| waitForAllLinks | pattern | ||
| waitForNotAllLinks | pattern | ||
| storeAllWindowIds | variableName | ||
| assertAllWindowIds | pattern | ||
| assertNotAllWindowIds | pattern | ||
| verifyAllWindowIds | pattern | ||
| verifyNotAllWindowIds | pattern | ||
| waitForAllWindowIds | pattern | ||
| waitForNotAllWindowIds | pattern | ||
| storeAllWindowNames | variableName | ||
| assertAllWindowNames | pattern | ||
| assertNotAllWindowNames | pattern | ||
| verifyAllWindowNames | pattern | ||
| verifyNotAllWindowNames | pattern | ||
| waitForAllWindowNames | pattern | ||
| waitForNotAllWindowNames | pattern | ||
| storeAllWindowTitles | variableName | ||
| assertAllWindowTitles | pattern | ||
| assertNotAllWindowTitles | pattern | ||
| verifyAllWindowTitles | pattern | ||
| verifyNotAllWindowTitles | pattern | ||
| waitForAllWindowTitles | pattern | ||
| waitForNotAllWindowTitles | pattern | ||
| storeAttribute | attributeLocator | variableName | |
| assertAttribute | attributeLocator | pattern | |
| assertNotAttribute | attributeLocator | pattern | |
| verifyAttribute | attributeLocator | pattern | |
| verifyNotAttribute | attributeLocator | pattern | |
| waitForAttribute | attributeLocator | pattern | |
| waitForNotAttribute | attributeLocator | pattern | |
| storeAttributeFromAllWindows | attributeName | variableName | |
| assertAttributeFromAllWindows | attributeName | pattern | |
| assertNotAttributeFromAllWindows | attributeName | pattern | |
| verifyAttributeFromAllWindows | attributeName | pattern | |
| verifyNotAttributeFromAllWindows | attributeName | pattern | |
| waitForAttributeFromAllWindows | attributeName | pattern | |
| waitForNotAttributeFromAllWindows | attributeName | pattern | |
| storeBodyText | variableName | ||
| assertBodyText | pattern | ||
| assertNotBodyText | pattern | ||
| verifyBodyText | pattern | ||
| verifyNotBodyText | pattern | ||
| waitForBodyText | pattern | ||
| waitForNotBodyText | pattern | ||
| storeChecked | variableName | ||
| assertChecked | pattern | ||
| assertNotChecked | pattern | ||
| verifyChecked | pattern | ||
| verifyNotChecked | pattern | ||
| waitForChecked | pattern |
Unimplemented Selenese Commands
SeleniumHTMLUnit is a TestMaker object library that translates Selenese commands on-to-fly and runs the commands using the HTMLUnit headless browser. Some Selenese commands do not make sense in a TestMaker context. For example, TestMaker provides cookie management commands of its own. The following is a list of Selenese commands not implemented in SeleniumHTMLUnit. TestMaker throws a NotImplemented exception when encountering one of the following commands:
|
altKeyDown |
getAlert |
getTable |
mouseMoveAt |
|
altKeyUp |
getAllButtons |
getWhetherThisFrameMatchFrameExpression |
mouseUpAt |
|
answerOnNextPrompt |
getAllFields |
getWhetherThisWindowMatchWindowExpression |
openWindow |
|
captureScreenshot |
getAllLinks |
getWhetherThisWindowMatchWindowExpression |
refresh |
|
chooseCancelOnNextConfirmation |
getAllWindowIds |
getXpathCount |
setBrowserLogLevel |
|
chooseOkOnNextConfirmation |
getAllWindowNames |
highlight |
setContext |
|
clickAt |
getAllWindowTitles |
isAlertPresent |
setCursorPosition |
|
close |
getAttributeFromAllWindows |
isConfirmationPresent |
setMouseSpeed |
|
controlKeyDown |
getBodyText |
isEditable |
shiftKeyDown |
|
controlKeyUp |
getConfirmation |
isOrdered |
shiftKeyUp |
|
controlKeyUp |
getCookie |
isPromptPresent |
start |
|
createCookie |
getCursorPosition |
keyDown |
submit |
|
deleteCookie |
getElementHeight |
keyPress |
typeKeys |
|
doubleClick |
getElementIndex |
keyUp |
waitForFrameToLoad |
|
doubleClickAt |
getElementPositionLeft |
metaKeyDown |
waitForPopUp |
|
dragAndDrop |
getElementPositionTop |
metaKeyUp |
windowFocus |
|
dragAndDropToObject |
getElementWidth |
mouseDownAt |
windowMaximize |
|
dragdrop |
getExpression |
mouseMove |
|
|
fireEvent |
getLocation |
||
|
getMouseSpeed |
|||
|
getPrompt |

