PHPUnit Selenium Docs
|
Go to the source code of this file.
Functions | |
addLocationStrategy ($strategyName, $functionDefinition) | |
addLocationStrategyAndWait ($strategyName, $functionDefinition) | |
addScript ($scriptContent, $scriptTagId) | |
addScriptAndWait ($scriptContent, $scriptTagId) | |
addSelection ($locator, $optionLocator) | |
addSelectionAndWait ($locator, $optionLocator) | |
allowNativeXpath ($allow) | |
allowNativeXpathAndWait ($allow) | |
altKeyDown () | |
altKeyDownAndWait () | |
altKeyUp () | |
altKeyUpAndWait () | |
answerOnNextPrompt ($answer) | |
assertAlert ($pattern) | |
assertNotAlert ($pattern) | |
getAlert () | |
storeAlert ($variableName) | |
verifyAlert ($pattern) | |
verifyNotAlert ($pattern) | |
waitForAlert ($pattern) | |
waitForNotAlert ($pattern) | |
assertAlertNotPresent () | |
assertAlertPresent () | |
isAlertPresent () | |
storeAlertPresent ($variableName) | |
verifyAlertNotPresent () | |
verifyAlertPresent () | |
waitForAlertNotPresent () | |
waitForAlertPresent () | |
assertAllButtons ($pattern) | |
assertNotAllButtons ($pattern) | |
getAllButtons () | |
storeAllButtons ($variableName) | |
verifyAllButtons ($pattern) | |
verifyNotAllButtons ($pattern) | |
waitForAllButtons ($pattern) | |
waitForNotAllButtons ($pattern) | |
assertAllFields ($pattern) | |
assertNotAllFields ($pattern) | |
getAllFields () | |
storeAllFields ($variableName) | |
verifyAllFields ($pattern) | |
verifyNotAllFields ($pattern) | |
waitForAllFields ($pattern) | |
waitForNotAllFields ($pattern) | |
assertAllLinks ($pattern) | |
assertNotAllLinks ($pattern) | |
getAllLinks () | |
storeAllLinks ($variableName) | |
verifyAllLinks ($pattern) | |
verifyNotAllLinks ($pattern) | |
waitForAllLinks ($pattern) | |
waitForNotAllLinks ($pattern) | |
assertAllWindowIds ($pattern) | |
assertNotAllWindowIds ($pattern) | |
getAllWindowIds () | |
storeAllWindowIds ($variableName) | |
verifyAllWindowIds ($pattern) | |
verifyNotAllWindowIds ($pattern) | |
waitForAllWindowIds ($pattern) | |
waitForNotAllWindowIds ($pattern) | |
assertAllWindowNames ($pattern) | |
assertNotAllWindowNames ($pattern) | |
getAllWindowNames () | |
storeAllWindowNames ($variableName) | |
verifyAllWindowNames ($pattern) | |
verifyNotAllWindowNames ($pattern) | |
waitForAllWindowNames ($pattern) | |
waitForNotAllWindowNames ($pattern) | |
assertAllWindowTitles ($pattern) | |
assertNotAllWindowTitles ($pattern) | |
getAllWindowTitles () | |
storeAllWindowTitles ($variableName) | |
verifyAllWindowTitles ($pattern) | |
verifyNotAllWindowTitles ($pattern) | |
waitForAllWindowTitles ($pattern) | |
waitForNotAllWindowTitles ($pattern) | |
assertAttribute ($attributeLocator, $pattern) | |
assertNotAttribute ($attributeLocator, $pattern) | |
getAttribute ($attributeLocator) | |
storeAttribute ($attributeLocator, $variableName) | |
verifyAttribute ($attributeLocator, $pattern) | |
verifyNotAttribute ($attributeLocator, $pattern) | |
waitForAttribute ($attributeLocator, $pattern) | |
waitForNotAttribute ($attributeLocator, $pattern) | |
assertAttributeFromAllWindows ($attributeName, $pattern) | |
assertNotAttributeFromAllWindows ($attributeName, $pattern) | |
getAttributeFromAllWindows ($attributeName) | |
storeAttributeFromAllWindows ($attributeName, $variableName) | |
verifyAttributeFromAllWindows ($attributeName, $pattern) | |
verifyNotAttributeFromAllWindows ($attributeName, $pattern) | |
waitForAttributeFromAllWindows ($attributeName, $pattern) | |
waitForNotAttributeFromAllWindows ($attributeName, $pattern) | |
assertBodyText ($pattern) | |
assertNotBodyText ($pattern) | |
getBodyText () | |
storeBodyText ($variableName) | |
verifyBodyText ($pattern) | |
verifyNotBodyText ($pattern) | |
waitForBodyText ($pattern) | |
waitForNotBodyText ($pattern) | |
assertChecked ($locator) | |
assertNotChecked ($locator) | |
isChecked ($locator) | |
storeChecked ($locator, $variableName) | |
verifyChecked ($locator) | |
verifyNotChecked ($locator) | |
waitForChecked ($locator) | |
waitForNotChecked ($locator) | |
assertConfirmation ($pattern) | |
assertNotConfirmation ($pattern) | |
getConfirmation () | |
storeConfirmation ($variableName) | |
verifyConfirmation ($pattern) | |
verifyNotConfirmation ($pattern) | |
waitForConfirmation ($pattern) | |
waitForNotConfirmation ($pattern) | |
assertConfirmationNotPresent () | |
assertConfirmationPresent () | |
isConfirmationPresent () | |
storeConfirmationPresent ($variableName) | |
verifyConfirmationNotPresent () | |
verifyConfirmationPresent () | |
waitForConfirmationNotPresent () | |
waitForConfirmationPresent () | |
assertCookie ($pattern) | |
assertNotCookie ($pattern) | |
getCookie () | |
storeCookie ($variableName) | |
verifyCookie ($pattern) | |
verifyNotCookie ($pattern) | |
waitForCookie ($pattern) | |
waitForNotCookie ($pattern) | |
assertCookieByName ($name, $pattern) | |
assertNotCookieByName ($name, $pattern) | |
getCookieByName ($name) | |
storeCookieByName ($name, $variableName) | |
verifyCookieByName ($name, $pattern) | |
verifyNotCookieByName ($name, $pattern) | |
waitForCookieByName ($name, $pattern) | |
waitForNotCookieByName ($name, $pattern) | |
assertCookieNotPresent ($name) | |
assertCookiePresent ($name) | |
isCookiePresent ($name) | |
storeCookiePresent ($name, $variableName) | |
verifyCookieNotPresent ($name) | |
verifyCookiePresent ($name) | |
waitForCookieNotPresent ($name) | |
waitForCookiePresent ($name) | |
assertCursorPosition ($locator, $pattern) | |
assertNotCursorPosition ($locator, $pattern) | |
getCursorPosition ($locator) | |
storeCursorPosition ($locator, $variableName) | |
verifyCursorPosition ($locator, $pattern) | |
verifyNotCursorPosition ($locator, $pattern) | |
waitForCursorPosition ($locator, $pattern) | |
waitForNotCursorPosition ($locator, $pattern) | |
assertEditable ($locator) | |
assertNotEditable ($locator) | |
isEditable ($locator) | |
storeEditable ($locator, $variableName) | |
verifyEditable ($locator) | |
verifyNotEditable ($locator) | |
waitForEditable ($locator) | |
waitForNotEditable ($locator) | |
assertElementHeight ($locator, $pattern) | |
assertNotElementHeight ($locator, $pattern) | |
getElementHeight ($locator) | |
storeElementHeight ($locator, $variableName) | |
verifyElementHeight ($locator, $pattern) | |
verifyNotElementHeight ($locator, $pattern) | |
waitForElementHeight ($locator, $pattern) | |
waitForNotElementHeight ($locator, $pattern) | |
assertElementIndex ($locator, $pattern) | |
assertNotElementIndex ($locator, $pattern) | |
getElementIndex ($locator) | |
storeElementIndex ($locator, $variableName) | |
verifyElementIndex ($locator, $pattern) | |
verifyNotElementIndex ($locator, $pattern) | |
waitForElementIndex ($locator, $pattern) | |
waitForNotElementIndex ($locator, $pattern) | |
assertElementNotPresent ($locator) | |
assertElementPresent ($locator) | |
isElementPresent ($locator) | |
storeElementPresent ($locator, $variableName) | |
verifyElementNotPresent ($locator) | |
verifyElementPresent ($locator) | |
waitForElementNotPresent ($locator) | |
waitForElementPresent ($locator) | |
assertElementPositionLeft ($locator, $pattern) | |
assertNotElementPositionLeft ($locator, $pattern) | |
getElementPositionLeft ($locator) | |
storeElementPositionLeft ($locator, $variableName) | |
verifyElementPositionLeft ($locator, $pattern) | |
verifyNotElementPositionLeft ($locator, $pattern) | |
waitForElementPositionLeft ($locator, $pattern) | |
waitForNotElementPositionLeft ($locator, $pattern) | |
assertElementPositionTop ($locator, $pattern) | |
assertNotElementPositionTop ($locator, $pattern) | |
getElementPositionTop ($locator) | |
storeElementPositionTop ($locator, $variableName) | |
verifyElementPositionTop ($locator, $pattern) | |
verifyNotElementPositionTop ($locator, $pattern) | |
waitForElementPositionTop ($locator, $pattern) | |
waitForNotElementPositionTop ($locator, $pattern) | |
assertElementWidth ($locator, $pattern) | |
assertNotElementWidth ($locator, $pattern) | |
getElementWidth ($locator) | |
storeElementWidth ($locator, $variableName) | |
verifyElementWidth ($locator, $pattern) | |
verifyNotElementWidth ($locator, $pattern) | |
waitForElementWidth ($locator, $pattern) | |
waitForNotElementWidth ($locator, $pattern) | |
assertEval ($script, $pattern) | |
assertNotEval ($script, $pattern) | |
getEval ($script) | |
storeEval ($script, $variableName) | |
verifyEval ($script, $pattern) | |
verifyNotEval ($script, $pattern) | |
waitForEval ($script, $pattern) | |
waitForNotEval ($script, $pattern) | |
assertExpression ($expression, $pattern) | |
assertNotExpression ($expression, $pattern) | |
getExpression ($expression) | |
storeExpression ($expression, $variableName) | |
verifyExpression ($expression, $pattern) | |
verifyNotExpression ($expression, $pattern) | |
waitForExpression ($expression, $pattern) | |
waitForNotExpression ($expression, $pattern) | |
assertHtmlSource ($pattern) | |
assertNotHtmlSource ($pattern) | |
getHtmlSource () | |
storeHtmlSource ($variableName) | |
verifyHtmlSource ($pattern) | |
verifyNotHtmlSource ($pattern) | |
waitForHtmlSource ($pattern) | |
waitForNotHtmlSource ($pattern) | |
assertLocation ($pattern) | |
assertNotLocation ($pattern) | |
getLocation () | |
storeLocation ($variableName) | |
verifyLocation ($pattern) | |
verifyNotLocation ($pattern) | |
waitForLocation ($pattern) | |
waitForNotLocation ($pattern) | |
assertMouseSpeed ($pattern) | |
assertNotMouseSpeed ($pattern) | |
getMouseSpeed () | |
storeMouseSpeed ($variableName) | |
verifyMouseSpeed ($pattern) | |
verifyNotMouseSpeed ($pattern) | |
waitForMouseSpeed ($pattern) | |
waitForNotMouseSpeed ($pattern) | |
assertNotOrdered ($locator1, $locator2) | |
assertOrdered ($locator1, $locator2) | |
isOrdered ($locator1, $locator2) | |
storeOrdered ($locator1, $locator2, $variableName) | |
verifyNotOrdered ($locator1, $locator2) | |
verifyOrdered ($locator1, $locator2) | |
waitForNotOrdered ($locator1, $locator2) | |
waitForOrdered ($locator1, $locator2) | |
assertNotPrompt ($pattern) | |
assertPrompt ($pattern) | |
getPrompt () | |
storePrompt ($variableName) | |
verifyNotPrompt ($pattern) | |
verifyPrompt ($pattern) | |
waitForNotPrompt ($pattern) | |
waitForPrompt ($pattern) | |
assertNotSelectOptions ($selectLocator, $pattern) | |
assertSelectOptions ($selectLocator, $pattern) | |
getSelectOptions ($selectLocator) | |
storeSelectOptions ($selectLocator, $variableName) | |
verifyNotSelectOptions ($selectLocator, $pattern) | |
verifySelectOptions ($selectLocator, $pattern) | |
waitForNotSelectOptions ($selectLocator, $pattern) | |
waitForSelectOptions ($selectLocator, $pattern) | |
assertNotSelectedId ($selectLocator, $pattern) | |
assertSelectedId ($selectLocator, $pattern) | |
getSelectedId ($selectLocator) | |
storeSelectedId ($selectLocator, $variableName) | |
verifyNotSelectedId ($selectLocator, $pattern) | |
verifySelectedId ($selectLocator, $pattern) | |
waitForNotSelectedId ($selectLocator, $pattern) | |
waitForSelectedId ($selectLocator, $pattern) | |
assertNotSelectedIds ($selectLocator, $pattern) | |
assertSelectedIds ($selectLocator, $pattern) | |
getSelectedIds ($selectLocator) | |
storeSelectedIds ($selectLocator, $variableName) | |
verifyNotSelectedIds ($selectLocator, $pattern) | |
verifySelectedIds ($selectLocator, $pattern) | |
waitForNotSelectedIds ($selectLocator, $pattern) | |
waitForSelectedIds ($selectLocator, $pattern) | |
assertNotSelectedIndex ($selectLocator, $pattern) | |
assertSelectedIndex ($selectLocator, $pattern) | |
getSelectedIndex ($selectLocator) | |
storeSelectedIndex ($selectLocator, $variableName) | |
verifyNotSelectedIndex ($selectLocator, $pattern) | |
verifySelectedIndex ($selectLocator, $pattern) | |
waitForNotSelectedIndex ($selectLocator, $pattern) | |
waitForSelectedIndex ($selectLocator, $pattern) | |
assertNotSelectedIndexes ($selectLocator, $pattern) | |
assertSelectedIndexes ($selectLocator, $pattern) | |
getSelectedIndexes ($selectLocator) | |
storeSelectedIndexes ($selectLocator, $variableName) | |
verifyNotSelectedIndexes ($selectLocator, $pattern) | |
verifySelectedIndexes ($selectLocator, $pattern) | |
waitForNotSelectedIndexes ($selectLocator, $pattern) | |
waitForSelectedIndexes ($selectLocator, $pattern) | |
assertNotSelectedLabel ($selectLocator, $pattern) | |
assertSelectedLabel ($selectLocator, $pattern) | |
getSelectedLabel ($selectLocator) | |
storeSelectedLabel ($selectLocator, $variableName) | |
verifyNotSelectedLabel ($selectLocator, $pattern) | |
verifySelectedLabel ($selectLocator, $pattern) | |
waitForNotSelectedLabel ($selectLocator, $pattern) | |
waitForSelectedLabel ($selectLocator, $pattern) | |
assertNotSelectedLabels ($selectLocator, $pattern) | |
assertSelectedLabels ($selectLocator, $pattern) | |
getSelectedLabels ($selectLocator) | |
storeSelectedLabels ($selectLocator, $variableName) | |
verifyNotSelectedLabels ($selectLocator, $pattern) | |
verifySelectedLabels ($selectLocator, $pattern) | |
waitForNotSelectedLabels ($selectLocator, $pattern) | |
waitForSelectedLabels ($selectLocator, $pattern) | |
assertNotSelectedValue ($selectLocator, $pattern) | |
assertSelectedValue ($selectLocator, $pattern) | |
getSelectedValue ($selectLocator) | |
storeSelectedValue ($selectLocator, $variableName) | |
verifyNotSelectedValue ($selectLocator, $pattern) | |
verifySelectedValue ($selectLocator, $pattern) | |
waitForNotSelectedValue ($selectLocator, $pattern) | |
waitForSelectedValue ($selectLocator, $pattern) | |
assertNotSelectedValues ($selectLocator, $pattern) | |
assertSelectedValues ($selectLocator, $pattern) | |
getSelectedValues ($selectLocator) | |
storeSelectedValues ($selectLocator, $variableName) | |
verifyNotSelectedValues ($selectLocator, $pattern) | |
verifySelectedValues ($selectLocator, $pattern) | |
waitForNotSelectedValues ($selectLocator, $pattern) | |
waitForSelectedValues ($selectLocator, $pattern) | |
assertNotSomethingSelected ($selectLocator) | |
assertSomethingSelected ($selectLocator) | |
isSomethingSelected ($selectLocator) | |
storeSomethingSelected ($selectLocator, $variableName) | |
verifyNotSomethingSelected ($selectLocator) | |
verifySomethingSelected ($selectLocator) | |
waitForNotSomethingSelected ($selectLocator) | |
waitForSomethingSelected ($selectLocator) | |
assertNotSpeed ($pattern) | |
assertSpeed ($pattern) | |
getSpeed () | |
storeSpeed ($variableName) | |
verifyNotSpeed ($pattern) | |
verifySpeed ($pattern) | |
waitForNotSpeed ($pattern) | |
waitForSpeed ($pattern) | |
assertNotTable ($tableCellAddress, $pattern) | |
assertTable ($tableCellAddress, $pattern) | |
getTable ($tableCellAddress) | |
storeTable ($tableCellAddress, $variableName) | |
verifyNotTable ($tableCellAddress, $pattern) | |
verifyTable ($tableCellAddress, $pattern) | |
waitForNotTable ($tableCellAddress, $pattern) | |
waitForTable ($tableCellAddress, $pattern) | |
assertNotText ($locator, $pattern) | |
assertText ($locator, $pattern) | |
getText ($locator) | |
storeText ($locator, $variableName) | |
verifyNotText ($locator, $pattern) | |
verifyText ($locator, $pattern) | |
waitForNotText ($locator, $pattern) | |
waitForText ($locator, $pattern) | |
assertNotTitle ($pattern) | |
assertTitle ($pattern) | |
getTitle () | |
storeTitle ($variableName) | |
verifyNotTitle ($pattern) | |
verifyTitle ($pattern) | |
waitForNotTitle ($pattern) | |
waitForTitle ($pattern) | |
assertNotValue ($locator, $pattern) | |
assertValue ($locator, $pattern) | |
getValue ($locator) | |
storeValue ($locator, $variableName) | |
verifyNotValue ($locator, $pattern) | |
verifyValue ($locator, $pattern) | |
waitForNotValue ($locator, $pattern) | |
waitForValue ($locator, $pattern) | |
assertNotVisible ($locator) | |
assertVisible ($locator) | |
isVisible ($locator) | |
storeVisible ($locator, $variableName) | |
verifyNotVisible ($locator) | |
verifyVisible ($locator) | |
waitForNotVisible ($locator) | |
waitForVisible ($locator) | |
assertNotWhetherThisFrameMatchFrameExpression ($currentFrameString, $target) | |
assertWhetherThisFrameMatchFrameExpression ($currentFrameString, $target) | |
getWhetherThisFrameMatchFrameExpression ($currentFrameString, $target) | |
storeWhetherThisFrameMatchFrameExpression ($currentFrameString, $target, $variableName) | |
verifyNotWhetherThisFrameMatchFrameExpression ($currentFrameString, $target) | |
verifyWhetherThisFrameMatchFrameExpression ($currentFrameString, $target) | |
waitForNotWhetherThisFrameMatchFrameExpression ($currentFrameString, $target) | |
waitForWhetherThisFrameMatchFrameExpression ($currentFrameString, $target) | |
assertNotWhetherThisWindowMatchWindowExpression ($currentWindowString, $target) | |
assertWhetherThisWindowMatchWindowExpression ($currentWindowString, $target) | |
getWhetherThisWindowMatchWindowExpression ($currentWindowString, $target) | |
storeWhetherThisWindowMatchWindowExpression ($currentWindowString, $target, $variableName) | |
verifyNotWhetherThisWindowMatchWindowExpression ($currentWindowString, $target) | |
verifyWhetherThisWindowMatchWindowExpression ($currentWindowString, $target) | |
waitForNotWhetherThisWindowMatchWindowExpression ($currentWindowString, $target) | |
waitForWhetherThisWindowMatchWindowExpression ($currentWindowString, $target) | |
assertNotXpathCount ($xpath, $pattern) | |
assertXpathCount ($xpath, $pattern) | |
getXpathCount ($xpath) | |
storeXpathCount ($xpath, $variableName) | |
verifyNotXpathCount ($xpath, $pattern) | |
verifyXpathCount ($xpath, $pattern) | |
waitForNotXpathCount ($xpath, $pattern) | |
waitForXpathCount ($xpath, $pattern) | |
assertPromptNotPresent () | |
assertPromptPresent () | |
isPromptPresent () | |
storePromptPresent ($variableName) | |
verifyPromptNotPresent () | |
verifyPromptPresent () | |
waitForPromptNotPresent () | |
waitForPromptPresent () | |
assertTextNotPresent ($pattern) | |
assertTextPresent ($pattern) | |
isTextPresent ($pattern) | |
storeTextPresent ($pattern, $variableName) | |
verifyTextNotPresent ($pattern) | |
verifyTextPresent ($pattern) | |
waitForTextNotPresent ($pattern) | |
waitForTextPresent ($pattern) | |
assignId ($locator, $identifier) | |
assignIdAndWait ($locator, $identifier) | |
attachFile ($fieldLocator, $fileLocator) | |
captureEntirePageScreenshot ($filename, $kwargs) | |
captureEntirePageScreenshotAndWait ($filename, $kwargs) | |
captureEntirePageScreenshotToString ($kwargs) | |
captureEntirePageScreenshotToStringAndWait ($kwargs) | |
captureScreenshot ($filename) | |
captureScreenshotAndWait ($filename) | |
captureScreenshotToString () | |
captureScreenshotToStringAndWait () | |
check ($locator) | |
checkAndWait ($locator) | |
chooseCancelOnNextConfirmation () | |
chooseCancelOnNextConfirmationAndWait () | |
chooseOkOnNextConfirmation () | |
chooseOkOnNextConfirmationAndWait () | |
click ($locator) | |
clickAndWait ($locator) | |
clickAt ($locator, $coordString) | |
clickAtAndWait ($locator, $coordString) | |
close () | |
contextMenu ($locator) | |
contextMenuAndWait ($locator) | |
contextMenuAt ($locator, $coordString) | |
contextMenuAtAndWait ($locator, $coordString) | |
controlKeyDown () | |
controlKeyDownAndWait () | |
controlKeyUp () | |
controlKeyUpAndWait () | |
createCookie ($nameValuePair, $optionsString) | |
createCookieAndWait ($nameValuePair, $optionsString) | |
deleteAllVisibleCookies () | |
deleteAllVisibleCookiesAndWait () | |
deleteCookie ($name, $optionsString) | |
deleteCookieAndWait ($name, $optionsString) | |
deselectPopUp () | |
deselectPopUpAndWait () | |
doubleClick ($locator) | |
doubleClickAndWait ($locator) | |
doubleClickAt ($locator, $coordString) | |
doubleClickAtAndWait ($locator, $coordString) | |
dragAndDrop ($locator, $movementsString) | |
dragAndDropAndWait ($locator, $movementsString) | |
dragAndDropToObject ($locatorOfObjectToBeDragged, $locatorOfDragDestinationObject) | |
dragAndDropToObjectAndWait ($locatorOfObjectToBeDragged, $locatorOfDragDestinationObject) | |
dragDrop ($locator, $movementsString) | |
dragDropAndWait ($locator, $movementsString) | |
fireEvent ($locator, $eventName) | |
fireEventAndWait ($locator, $eventName) | |
focus ($locator) | |
focusAndWait ($locator) | |
goBack () | |
goBackAndWait () | |
highlight ($locator) | |
highlightAndWait ($locator) | |
ignoreAttributesWithoutValue ($ignore) | |
ignoreAttributesWithoutValueAndWait ($ignore) | |
keyDown ($locator, $keySequence) | |
keyDownAndWait ($locator, $keySequence) | |
keyDownNative ($keycode) | |
keyDownNativeAndWait ($keycode) | |
keyPress ($locator, $keySequence) | |
keyPressAndWait ($locator, $keySequence) | |
keyPressNative ($keycode) | |
keyPressNativeAndWait ($keycode) | |
keyUp ($locator, $keySequence) | |
keyUpAndWait ($locator, $keySequence) | |
keyUpNative ($keycode) | |
keyUpNativeAndWait ($keycode) | |
metaKeyDown () | |
metaKeyDownAndWait () | |
metaKeyUp () | |
metaKeyUpAndWait () | |
mouseDown ($locator) | |
mouseDownAndWait ($locator) | |
mouseDownAt ($locator, $coordString) | |
mouseDownAtAndWait ($locator, $coordString) | |
mouseMove ($locator) | |
mouseMoveAndWait ($locator) | |
mouseMoveAt ($locator, $coordString) | |
mouseMoveAtAndWait ($locator, $coordString) | |
mouseOut ($locator) | |
mouseOutAndWait ($locator) | |
mouseOver ($locator) | |
mouseOverAndWait ($locator) | |
mouseUp ($locator) | |
mouseUpAndWait ($locator) | |
mouseUpAt ($locator, $coordString) | |
mouseUpAtAndWait ($locator, $coordString) | |
mouseUpRight ($locator) | |
mouseUpRightAndWait ($locator) | |
mouseUpRightAt ($locator, $coordString) | |
mouseUpRightAtAndWait ($locator, $coordString) | |
open ($url) | |
openWindow ($url, $windowID) | |
openWindowAndWait ($url, $windowID) | |
pause ($waitTime) | |
refresh () | |
refreshAndWait () | |
removeAllSelections ($locator) | |
removeAllSelectionsAndWait ($locator) | |
removeScript ($scriptTagId) | |
removeScriptAndWait ($scriptTagId) | |
removeSelection ($locator, $optionLocator) | |
removeSelectionAndWait ($locator, $optionLocator) | |
retrieveLastRemoteControlLogs () | |
rollup ($rollupName, $kwargs) | |
rollupAndWait ($rollupName, $kwargs) | |
runScript ($script) | |
runScriptAndWait ($script) | |
select ($selectLocator, $optionLocator) | |
selectAndWait ($selectLocator, $optionLocator) | |
selectFrame ($locator) | |
selectPopUp ($windowID) | |
selectPopUpAndWait ($windowID) | |
selectWindow ($windowID) | |
setBrowserLogLevel ($logLevel) | |
setBrowserLogLevelAndWait ($logLevel) | |
setContext ($context) | |
setCursorPosition ($locator, $position) | |
setCursorPositionAndWait ($locator, $position) | |
setMouseSpeed ($pixels) | |
setMouseSpeedAndWait ($pixels) | |
setSpeed ($value) | |
setSpeedAndWait ($value) | |
shiftKeyDown () | |
shiftKeyDownAndWait () | |
shiftKeyUp () | |
shiftKeyUpAndWait () | |
shutDownSeleniumServer () | |
store ($expression, $variableName) | |
submit ($formLocator) | |
submitAndWait ($formLocator) | |
type ($locator, $value) | |
typeAndWait ($locator, $value) | |
typeKeys ($locator, $value) | |
typeKeysAndWait ($locator, $value) | |
uncheck ($locator) | |
uncheckAndWait ($locator) | |
useXpathLibrary ($libraryName) | |
useXpathLibraryAndWait ($libraryName) | |
waitForCondition ($script, $timeout) | |
waitForFrameToLoad ($frameAddress, $timeout) | |
waitForPageToLoad ($timeout) | |
waitForPopUp ($windowID, $timeout) | |
windowFocus () | |
windowMaximize () | |
Variables | |
trait | SeleniumTestCaseDoc |
$doc_Element_Locators | |
$doc_Element_Filters | |
$doc_String_match_Patterns | |
$doc_Stored_Variables | |
addLocationStrategy | ( | $strategyName, | |
$functionDefinition | |||
) |
Defines a new function for Selenium to locate elements on the page.
For example, if you define the strategy "foo", and someone runs click("foo=blah"), we'll run your function, passing you the string "blah", and click on the element that your function returns, or throw an "Element not found" error if your function returns null. We'll pass three arguments to your function:
The function must return null if the element can't be found.
string | $strategyName | the name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation. |
string | $functionDefinition | a string defining the body of a function in JavaScript. For example: return inDocument.getElementById(locator); |
Definition at line 187 of file SeleniumTestCaseDoc.php.
addLocationStrategyAndWait | ( | $strategyName, | |
$functionDefinition | |||
) |
Defines a new function for Selenium to locate elements on the page.
For example, if you define the strategy "foo", and someone runs click("foo=blah"), we'll run your function, passing you the string "blah", and click on the element that your function returns, or throw an "Element not found" error if your function returns null. We'll pass three arguments to your function:
The function must return null if the element can't be found.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $strategyName | the name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation. |
string | $functionDefinition | a string defining the body of a function in JavaScript. For example: return inDocument.getElementById(locator); |
Definition at line 220 of file SeleniumTestCaseDoc.php.
addScript | ( | $scriptContent, | |
$scriptTagId | |||
) |
Loads script content into a new script tag in the Selenium document.
This differs from the runScript command in that runScript adds the script tag to the document of the AUT, not the Selenium document. The following entities in the script content are replaced by the characters they represent: < > & The corresponding remove command is removeScript.
string | $scriptContent | the Javascript content of the script to add |
string | $scriptTagId | (optional) the id of the new script tag. If specified, and an element with this id already exists, this operation will fail. |
Definition at line 240 of file SeleniumTestCaseDoc.php.
addScriptAndWait | ( | $scriptContent, | |
$scriptTagId | |||
) |
Loads script content into a new script tag in the Selenium document.
This differs from the runScript command in that runScript adds the script tag to the document of the AUT, not the Selenium document. The following entities in the script content are replaced by the characters they represent: < > & The corresponding remove command is removeScript.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $scriptContent | the Javascript content of the script to add |
string | $scriptTagId | (optional) the id of the new script tag. If specified, and an element with this id already exists, this operation will fail. |
Definition at line 264 of file SeleniumTestCaseDoc.php.
addSelection | ( | $locator, | |
$optionLocator | |||
) |
Add a selection to the set of selected options in a multi-select element using an option locator.
See select() for details of option locators.
string | $locator | an element locator identifying a multi-select box (see Element Locators) |
string | $optionLocator | an option locator (a label by default) |
Definition at line 282 of file SeleniumTestCaseDoc.php.
addSelectionAndWait | ( | $locator, | |
$optionLocator | |||
) |
Add a selection to the set of selected options in a multi-select element using an option locator.
See select() for details of option locators.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator identifying a multi-select box (see Element Locators) |
string | $optionLocator | an option locator (a label by default) |
Definition at line 304 of file SeleniumTestCaseDoc.php.
allowNativeXpath | ( | $allow | ) |
Specifies whether Selenium should use the native in-browser implementation of XPath (if any native version is available); if you pass "false" to this function, we will always use our pure-JavaScript xpath library.
Using the pure-JS xpath library can improve the consistency of xpath element locators between different browser vendors, but the pure-JS version is much slower than the native implementations.
string | $allow | boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath |
Definition at line 323 of file SeleniumTestCaseDoc.php.
allowNativeXpathAndWait | ( | $allow | ) |
Specifies whether Selenium should use the native in-browser implementation of XPath (if any native version is available); if you pass "false" to this function, we will always use our pure-JavaScript xpath library.
Using the pure-JS xpath library can improve the consistency of xpath element locators between different browser vendors, but the pure-JS version is much slower than the native implementations.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $allow | boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath |
Definition at line 346 of file SeleniumTestCaseDoc.php.
altKeyDown | ( | ) |
Press the alt key and hold it down until doAltUp() is called or a new page is loaded.
Definition at line 358 of file SeleniumTestCaseDoc.php.
altKeyDownAndWait | ( | ) |
Press the alt key and hold it down until doAltUp() is called or a new page is loaded.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 374 of file SeleniumTestCaseDoc.php.
altKeyUp | ( | ) |
Release the alt key.
Definition at line 386 of file SeleniumTestCaseDoc.php.
altKeyUpAndWait | ( | ) |
Release the alt key.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 402 of file SeleniumTestCaseDoc.php.
answerOnNextPrompt | ( | $answer | ) |
Instructs Selenium to return the specified answer string in response to the next JavaScript prompt [window.prompt()].
string | $answer | the answer to give in response to the prompt pop-up |
Definition at line 415 of file SeleniumTestCaseDoc.php.
assertAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAlert()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 454 of file SeleniumTestCaseDoc.php.
assertAlertNotPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAlertNotPresent()).
Definition at line 741 of file SeleniumTestCaseDoc.php.
assertAlertPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAlertPresent()).
Definition at line 770 of file SeleniumTestCaseDoc.php.
assertAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllButtons()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 967 of file SeleniumTestCaseDoc.php.
assertAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllFields()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1208 of file SeleniumTestCaseDoc.php.
assertAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllLinks()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1449 of file SeleniumTestCaseDoc.php.
assertAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllWindowIds()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1688 of file SeleniumTestCaseDoc.php.
assertAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllWindowNames()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1914 of file SeleniumTestCaseDoc.php.
assertAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllWindowTitles()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2140 of file SeleniumTestCaseDoc.php.
assertAttribute | ( | $attributeLocator, | |
$pattern | |||
) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAttribute()).
string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2370 of file SeleniumTestCaseDoc.php.
assertAttributeFromAllWindows | ( | $attributeName, | |
$pattern | |||
) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyAttributeFromAllWindows()).
string | $attributeName | name of an attribute on the windows |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2626 of file SeleniumTestCaseDoc.php.
assertBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyBodyText()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2866 of file SeleniumTestCaseDoc.php.
assertChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyChecked()).
string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3093 of file SeleniumTestCaseDoc.php.
assertConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
If assertion will fail the test, it will abort the current test case (in contrast to the verifyConfirmation()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3349 of file SeleniumTestCaseDoc.php.
assertConfirmationNotPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
If assertion will fail the test, it will abort the current test case (in contrast to the verifyConfirmationNotPresent()).
Definition at line 3658 of file SeleniumTestCaseDoc.php.
assertConfirmationPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
If assertion will fail the test, it will abort the current test case (in contrast to the verifyConfirmationPresent()).
Definition at line 3687 of file SeleniumTestCaseDoc.php.
assertCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
If assertion will fail the test, it will abort the current test case (in contrast to the verifyCookie()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3882 of file SeleniumTestCaseDoc.php.
assertCookieByName | ( | $name, | |
$pattern | |||
) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
If assertion will fail the test, it will abort the current test case (in contrast to the verifyCookieByName()).
string | $name | the name of the cookie |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4109 of file SeleniumTestCaseDoc.php.
assertCookieNotPresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyCookieNotPresent()).
string | $name | the name of the cookie |
Definition at line 4346 of file SeleniumTestCaseDoc.php.
assertCookiePresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyCookiePresent()).
string | $name | the name of the cookie |
Definition at line 4375 of file SeleniumTestCaseDoc.php.
assertCursorPosition | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
If assertion will fail the test, it will abort the current test case (in contrast to the verifyCursorPosition()).
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4578 of file SeleniumTestCaseDoc.php.
assertEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyEditable()).
string | $locator | an element locator (see Element Locators) |
Definition at line 4862 of file SeleniumTestCaseDoc.php.
assertElementHeight | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the height of an element.
height of an element in pixels
If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementHeight()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5109 of file SeleniumTestCaseDoc.php.
assertElementIndex | ( | $locator, | |
$pattern | |||
) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementIndex()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5353 of file SeleniumTestCaseDoc.php.
assertElementNotPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementNotPresent()).
string | $locator | an element locator (see Element Locators) |
Definition at line 5608 of file SeleniumTestCaseDoc.php.
assertElementPositionLeft | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementPositionLeft()).
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5840 of file SeleniumTestCaseDoc.php.
assertElementPositionTop | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementPositionTop()).
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6082 of file SeleniumTestCaseDoc.php.
assertElementPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementPresent()).
string | $locator | an element locator (see Element Locators) |
Definition at line 5638 of file SeleniumTestCaseDoc.php.
assertElementWidth | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the width of an element.
width of an element in pixels
If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementWidth()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6324 of file SeleniumTestCaseDoc.php.
assertEval | ( | $script, | |
$pattern | |||
) |
Assertion: Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet
If assertion will fail the test, it will abort the current test case (in contrast to the verifyEval()).
string | $script | the JavaScript snippet to run |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6574 of file SeleniumTestCaseDoc.php.
assertExpression | ( | $expression, | |
$pattern | |||
) |
Assertion: Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in
If assertion will fail the test, it will abort the current test case (in contrast to the verifyExpression()).
string | $expression | the value to return |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6874 of file SeleniumTestCaseDoc.php.
assertHtmlSource | ( | $pattern | ) |
Assertion: Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source
If assertion will fail the test, it will abort the current test case (in contrast to the verifyHtmlSource()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7128 of file SeleniumTestCaseDoc.php.
assertLocation | ( | $pattern | ) |
Assertion: Gets the absolute URL of the current page.
the absolute URL of the current page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyLocation()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7353 of file SeleniumTestCaseDoc.php.
assertMouseSpeed | ( | $pattern | ) |
Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
If assertion will fail the test, it will abort the current test case (in contrast to the verifyMouseSpeed()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7578 of file SeleniumTestCaseDoc.php.
assertNotAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAlert()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 493 of file SeleniumTestCaseDoc.php.
assertNotAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllButtons()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 999 of file SeleniumTestCaseDoc.php.
assertNotAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllFields()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1240 of file SeleniumTestCaseDoc.php.
assertNotAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllLinks()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1481 of file SeleniumTestCaseDoc.php.
assertNotAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllWindowIds()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1718 of file SeleniumTestCaseDoc.php.
assertNotAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllWindowNames()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1944 of file SeleniumTestCaseDoc.php.
assertNotAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllWindowTitles()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2170 of file SeleniumTestCaseDoc.php.
assertNotAttribute | ( | $attributeLocator, | |
$pattern | |||
) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAttribute()).
string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2404 of file SeleniumTestCaseDoc.php.
assertNotAttributeFromAllWindows | ( | $attributeName, | |
$pattern | |||
) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAttributeFromAllWindows()).
string | $attributeName | name of an attribute on the windows |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2658 of file SeleniumTestCaseDoc.php.
assertNotBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotBodyText()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2896 of file SeleniumTestCaseDoc.php.
assertNotChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotChecked()).
string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3125 of file SeleniumTestCaseDoc.php.
assertNotConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotConfirmation()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3391 of file SeleniumTestCaseDoc.php.
assertNotCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotCookie()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3912 of file SeleniumTestCaseDoc.php.
assertNotCookieByName | ( | $name, | |
$pattern | |||
) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotCookieByName()).
string | $name | the name of the cookie |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4141 of file SeleniumTestCaseDoc.php.
assertNotCursorPosition | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotCursorPosition()).
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4616 of file SeleniumTestCaseDoc.php.
assertNotEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotEditable()).
string | $locator | an element locator (see Element Locators) |
Definition at line 4894 of file SeleniumTestCaseDoc.php.
assertNotElementHeight | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the height of an element.
height of an element in pixels
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementHeight()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5141 of file SeleniumTestCaseDoc.php.
assertNotElementIndex | ( | $locator, | |
$pattern | |||
) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementIndex()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5387 of file SeleniumTestCaseDoc.php.
assertNotElementPositionLeft | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementPositionLeft()).
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5872 of file SeleniumTestCaseDoc.php.
assertNotElementPositionTop | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementPositionTop()).
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6114 of file SeleniumTestCaseDoc.php.
assertNotElementWidth | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the width of an element.
width of an element in pixels
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementWidth()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6356 of file SeleniumTestCaseDoc.php.
assertNotEval | ( | $script, | |
$pattern | |||
) |
Assertion: Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotEval()).
string | $script | the JavaScript snippet to run |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6614 of file SeleniumTestCaseDoc.php.
assertNotExpression | ( | $expression, | |
$pattern | |||
) |
Assertion: Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotExpression()).
string | $expression | the value to return |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6908 of file SeleniumTestCaseDoc.php.
assertNotHtmlSource | ( | $pattern | ) |
Assertion: Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotHtmlSource()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7158 of file SeleniumTestCaseDoc.php.
assertNotLocation | ( | $pattern | ) |
Assertion: Gets the absolute URL of the current page.
the absolute URL of the current page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotLocation()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7383 of file SeleniumTestCaseDoc.php.
assertNotMouseSpeed | ( | $pattern | ) |
Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotMouseSpeed()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7608 of file SeleniumTestCaseDoc.php.
assertNotOrdered | ( | $locator1, | |
$locator2 | |||
) |
Assertion: Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotOrdered()).
string | $locator1 | an element locator pointing to the first element (see Element Locators) |
string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 7808 of file SeleniumTestCaseDoc.php.
assertNotPrompt | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotPrompt()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8075 of file SeleniumTestCaseDoc.php.
assertNotSelectedId | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedId()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8602 of file SeleniumTestCaseDoc.php.
assertNotSelectedIds | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedIds()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8845 of file SeleniumTestCaseDoc.php.
assertNotSelectedIndex | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedIndex()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9088 of file SeleniumTestCaseDoc.php.
assertNotSelectedIndexes | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedIndexes()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9332 of file SeleniumTestCaseDoc.php.
assertNotSelectedLabel | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedLabel()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9582 of file SeleniumTestCaseDoc.php.
assertNotSelectedLabels | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedLabels()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9826 of file SeleniumTestCaseDoc.php.
assertNotSelectedValue | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedValue()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10074 of file SeleniumTestCaseDoc.php.
assertNotSelectedValues | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedValues()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10318 of file SeleniumTestCaseDoc.php.
assertNotSelectOptions | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectOptions()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8359 of file SeleniumTestCaseDoc.php.
assertNotSomethingSelected | ( | $selectLocator | ) |
Assertion: Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSomethingSelected()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10564 of file SeleniumTestCaseDoc.php.
assertNotSpeed | ( | $pattern | ) |
Assertion: Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds.
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSpeed()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10798 of file SeleniumTestCaseDoc.php.
assertNotTable | ( | $tableCellAddress, | |
$pattern | |||
) |
Assertion: Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotTable()).
string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11045 of file SeleniumTestCaseDoc.php.
assertNotText | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotText()).
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11297 of file SeleniumTestCaseDoc.php.
assertNotTitle | ( | $pattern | ) |
Assertion: Gets the title of the current page.
the title of the current page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotTitle()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11558 of file SeleniumTestCaseDoc.php.
assertNotValue | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotValue()).
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11787 of file SeleniumTestCaseDoc.php.
assertNotVisible | ( | $locator | ) |
Assertion: Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotVisible()).
string | $locator | an element locator (see Element Locators) |
Definition at line 12046 of file SeleniumTestCaseDoc.php.
assertNotWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
$target | |||
) |
Assertion: 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.
true if the new frame is this code's window
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotWhetherThisFrameMatchFrameExpression()).
string | $currentFrameString | starting frame |
string | $target | new frame (which might be relative to the current one) |
Definition at line 12311 of file SeleniumTestCaseDoc.php.
assertNotWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
$target | |||
) |
Assertion: 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.
true if the new window is this code's window
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotWhetherThisWindowMatchWindowExpression()).
string | $currentWindowString | starting window |
string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12588 of file SeleniumTestCaseDoc.php.
assertNotXpathCount | ( | $xpath, | |
$pattern | |||
) |
Assertion: Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath
If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotXpathCount()).
string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 12862 of file SeleniumTestCaseDoc.php.
assertOrdered | ( | $locator1, | |
$locator2 | |||
) |
Assertion: Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyOrdered()).
string | $locator1 | an element locator pointing to the first element (see Element Locators) |
string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 7842 of file SeleniumTestCaseDoc.php.
assertPrompt | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt
If assertion will fail the test, it will abort the current test case (in contrast to the verifyPrompt()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8113 of file SeleniumTestCaseDoc.php.
assertPromptNotPresent | ( | ) |
Assertion: Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt
If assertion will fail the test, it will abort the current test case (in contrast to the verifyPromptNotPresent()).
Definition at line 13106 of file SeleniumTestCaseDoc.php.
assertPromptPresent | ( | ) |
Assertion: Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt
If assertion will fail the test, it will abort the current test case (in contrast to the verifyPromptPresent()).
Definition at line 13135 of file SeleniumTestCaseDoc.php.
assertSelectedId | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedId()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8634 of file SeleniumTestCaseDoc.php.
assertSelectedIds | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedIds()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8877 of file SeleniumTestCaseDoc.php.
assertSelectedIndex | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedIndex()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9120 of file SeleniumTestCaseDoc.php.
assertSelectedIndexes | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedIndexes()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9365 of file SeleniumTestCaseDoc.php.
assertSelectedLabel | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedLabel()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9614 of file SeleniumTestCaseDoc.php.
assertSelectedLabels | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedLabels()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9859 of file SeleniumTestCaseDoc.php.
assertSelectedValue | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedValue()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10106 of file SeleniumTestCaseDoc.php.
assertSelectedValues | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedValues()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10351 of file SeleniumTestCaseDoc.php.
assertSelectOptions | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down
If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectOptions()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8391 of file SeleniumTestCaseDoc.php.
assertSomethingSelected | ( | $selectLocator | ) |
Assertion: Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifySomethingSelected()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10594 of file SeleniumTestCaseDoc.php.
assertSpeed | ( | $pattern | ) |
Assertion: Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds.
If assertion will fail the test, it will abort the current test case (in contrast to the verifySpeed()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10831 of file SeleniumTestCaseDoc.php.
assertTable | ( | $tableCellAddress, | |
$pattern | |||
) |
Assertion: Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell
If assertion will fail the test, it will abort the current test case (in contrast to the verifyTable()).
string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11078 of file SeleniumTestCaseDoc.php.
assertText | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element
If assertion will fail the test, it will abort the current test case (in contrast to the verifyText()).
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11332 of file SeleniumTestCaseDoc.php.
assertTextNotPresent | ( | $pattern | ) |
Assertion: Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyTextNotPresent()).
string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13330 of file SeleniumTestCaseDoc.php.
assertTextPresent | ( | $pattern | ) |
Assertion: Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyTextPresent()).
string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13360 of file SeleniumTestCaseDoc.php.
assertTitle | ( | $pattern | ) |
Assertion: Gets the title of the current page.
the title of the current page
If assertion will fail the test, it will abort the current test case (in contrast to the verifyTitle()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11588 of file SeleniumTestCaseDoc.php.
assertValue | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements
If assertion will fail the test, it will abort the current test case (in contrast to the verifyValue()).
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11821 of file SeleniumTestCaseDoc.php.
assertVisible | ( | $locator | ) |
Assertion: Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise
If assertion will fail the test, it will abort the current test case (in contrast to the verifyVisible()).
string | $locator | an element locator (see Element Locators) |
Definition at line 12080 of file SeleniumTestCaseDoc.php.
assertWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
$target | |||
) |
Assertion: 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.
true if the new frame is this code's window
If assertion will fail the test, it will abort the current test case (in contrast to the verifyWhetherThisFrameMatchFrameExpression()).
string | $currentFrameString | starting frame |
string | $target | new frame (which might be relative to the current one) |
Definition at line 12347 of file SeleniumTestCaseDoc.php.
assertWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
$target | |||
) |
Assertion: 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.
true if the new window is this code's window
If assertion will fail the test, it will abort the current test case (in contrast to the verifyWhetherThisWindowMatchWindowExpression()).
string | $currentWindowString | starting window |
string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12624 of file SeleniumTestCaseDoc.php.
assertXpathCount | ( | $xpath, | |
$pattern | |||
) |
Assertion: Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath
If assertion will fail the test, it will abort the current test case (in contrast to the verifyXpathCount()).
string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 12895 of file SeleniumTestCaseDoc.php.
assignId | ( | $locator, | |
$identifier | |||
) |
Temporarily sets the "id" attribute of the specified element, so you can locate it in the future using its ID rather than a slow/complicated XPath.
This ID will disappear once the page is reloaded.
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $identifier | a string to be used as the ID of the specified element |
Definition at line 13550 of file SeleniumTestCaseDoc.php.
assignIdAndWait | ( | $locator, | |
$identifier | |||
) |
Temporarily sets the "id" attribute of the specified element, so you can locate it in the future using its ID rather than a slow/complicated XPath.
This ID will disappear once the page is reloaded.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $identifier | a string to be used as the ID of the specified element |
Definition at line 13573 of file SeleniumTestCaseDoc.php.
attachFile | ( | $fieldLocator, | |
$fileLocator | |||
) |
Sets a file input (upload) field to the file listed in fileLocator.
string | $fieldLocator | an element locator (see Element Locators) |
string | $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. |
Definition at line 13591 of file SeleniumTestCaseDoc.php.
captureEntirePageScreenshot | ( | $filename, | |
$kwargs | |||
) |
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.
string | $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. |
string | $kwargs | a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options:
|
Definition at line 13619 of file SeleniumTestCaseDoc.php.
captureEntirePageScreenshotAndWait | ( | $filename, | |
$kwargs | |||
) |
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.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $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. |
string | $kwargs | a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options:
|
Definition at line 13651 of file SeleniumTestCaseDoc.php.
captureEntirePageScreenshotToString | ( | $kwargs | ) |
Downloads a screenshot of the browser current window canvas to a based 64 encoded PNG file.
The entire windows canvas is captured, including parts rendered outside of the current view port.
Note: Currently this only works in Mozilla and when running in chrome mode.
string | $kwargs | A kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD". This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text). |
Definition at line 13673 of file SeleniumTestCaseDoc.php.
captureEntirePageScreenshotToStringAndWait | ( | $kwargs | ) |
Downloads a screenshot of the browser current window canvas to a based 64 encoded PNG file.
The entire windows canvas is captured, including parts rendered outside of the current view port.
Note: Currently this only works in Mozilla and when running in chrome mode.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $kwargs | A kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD". This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text). |
Definition at line 13700 of file SeleniumTestCaseDoc.php.
captureScreenshot | ( | $filename | ) |
Captures a PNG screenshot to the specified file.
string | $filename | the absolute path to the file to be written, e.g. "c:\blah\screenshot.png" |
Definition at line 13714 of file SeleniumTestCaseDoc.php.
captureScreenshotAndWait | ( | $filename | ) |
Captures a PNG screenshot to the specified file.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $filename | the absolute path to the file to be written, e.g. "c:\blah\screenshot.png" |
Definition at line 13732 of file SeleniumTestCaseDoc.php.
captureScreenshotToString | ( | ) |
Capture a PNG screenshot.
It then returns the file as a base 64 encoded string.
Definition at line 13746 of file SeleniumTestCaseDoc.php.
captureScreenshotToStringAndWait | ( | ) |
Capture a PNG screenshot.
It then returns the file as a base 64 encoded string.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 13764 of file SeleniumTestCaseDoc.php.
check | ( | $locator | ) |
Check a toggle-button (checkbox/radio).
string | $locator | an element locator (see Element Locators) |
Definition at line 13779 of file SeleniumTestCaseDoc.php.
checkAndWait | ( | $locator | ) |
Check a toggle-button (checkbox/radio).
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 13798 of file SeleniumTestCaseDoc.php.
chooseCancelOnNextConfirmation | ( | ) |
By default, Selenium's overridden window.confirm() function will return true, as if the user had manually clicked OK; after running this command, the next call to confirm() will return false, as if the user had clicked Cancel.
Selenium will then resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call this command for each confirmation.
Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.
Definition at line 13818 of file SeleniumTestCaseDoc.php.
chooseCancelOnNextConfirmationAndWait | ( | ) |
By default, Selenium's overridden window.confirm() function will return true, as if the user had manually clicked OK; after running this command, the next call to confirm() will return false, as if the user had clicked Cancel.
Selenium will then resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call this command for each confirmation.
Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 13843 of file SeleniumTestCaseDoc.php.
chooseOkOnNextConfirmation | ( | ) |
Undo the effect of calling chooseCancelOnNextConfirmation.
Note that Selenium's overridden window.confirm() function will normally automatically return true, as if the user had manually clicked OK, so you shouldn't need to use this command unless for some reason you need to change your mind prior to the next confirmation. After any confirmation, Selenium will resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each confirmation.
Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.
Definition at line 13864 of file SeleniumTestCaseDoc.php.
chooseOkOnNextConfirmationAndWait | ( | ) |
Undo the effect of calling chooseCancelOnNextConfirmation.
Note that Selenium's overridden window.confirm() function will normally automatically return true, as if the user had manually clicked OK, so you shouldn't need to use this command unless for some reason you need to change your mind prior to the next confirmation. After any confirmation, Selenium will resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each confirmation.
Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 13889 of file SeleniumTestCaseDoc.php.
click | ( | $locator | ) |
Clicks on a link, button, checkbox or radio button.
If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
string | $locator | an element locator |
Definition at line 13905 of file SeleniumTestCaseDoc.php.
clickAndWait | ( | $locator | ) |
Clicks on a link, button, checkbox or radio button.
If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator |
Definition at line 13925 of file SeleniumTestCaseDoc.php.
clickAt | ( | $locator, | |
$coordString | |||
) |
Clicks on a link, button, checkbox or radio button.
If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
string | $locator | an element locator |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 13943 of file SeleniumTestCaseDoc.php.
clickAtAndWait | ( | $locator, | |
$coordString | |||
) |
Clicks on a link, button, checkbox or radio button.
If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 13965 of file SeleniumTestCaseDoc.php.
close | ( | ) |
Simulates the user clicking the "close" button in the titlebar of a popup window or tab.
Definition at line 13975 of file SeleniumTestCaseDoc.php.
contextMenu | ( | $locator | ) |
Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
string | $locator | an element locator |
Definition at line 13990 of file SeleniumTestCaseDoc.php.
contextMenuAndWait | ( | $locator | ) |
Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator |
Definition at line 14009 of file SeleniumTestCaseDoc.php.
contextMenuAt | ( | $locator, | |
$coordString | |||
) |
Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
string | $locator | an element locator |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 14026 of file SeleniumTestCaseDoc.php.
contextMenuAtAndWait | ( | $locator, | |
$coordString | |||
) |
Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 14047 of file SeleniumTestCaseDoc.php.
controlKeyDown | ( | ) |
Press the control key and hold it down until doControlUp() is called or a new page is loaded.
Definition at line 14059 of file SeleniumTestCaseDoc.php.
controlKeyDownAndWait | ( | ) |
Press the control key and hold it down until doControlUp() is called or a new page is loaded.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 14075 of file SeleniumTestCaseDoc.php.
controlKeyUp | ( | ) |
Release the control key.
Definition at line 14087 of file SeleniumTestCaseDoc.php.
controlKeyUpAndWait | ( | ) |
Release the control key.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 14103 of file SeleniumTestCaseDoc.php.
createCookie | ( | $nameValuePair, | |
$optionsString | |||
) |
Create a new cookie whose path and domain are same with those of current page under test, unless you specified a path for this cookie explicitly.
string | $nameValuePair | name and value of the cookie in a format "name=value" |
string | $optionsString | options for the cookie. Currently supported options include 'path', 'max_age' and 'domain'. the optionsString's format is "path=/path/, max_age=60, domain=.foo.com". The order of options are irrelevant, the unit of the value of 'max_age' is second. Note that specifying a domain that isn't a subset of the current domain will usually fail. |
Definition at line 14123 of file SeleniumTestCaseDoc.php.
createCookieAndWait | ( | $nameValuePair, | |
$optionsString | |||
) |
Create a new cookie whose path and domain are same with those of current page under test, unless you specified a path for this cookie explicitly.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $nameValuePair | name and value of the cookie in a format "name=value" |
string | $optionsString | options for the cookie. Currently supported options include 'path', 'max_age' and 'domain'. the optionsString's format is "path=/path/, max_age=60, domain=.foo.com". The order of options are irrelevant, the unit of the value of 'max_age' is second. Note that specifying a domain that isn't a subset of the current domain will usually fail. |
Definition at line 14147 of file SeleniumTestCaseDoc.php.
deleteAllVisibleCookies | ( | ) |
Calls deleteCookie with recurse=true on all cookies visible to the current page.
As noted on the documentation for deleteCookie, recurse=true can be much slower than simply deleting the cookies using a known domain/path.
Definition at line 14162 of file SeleniumTestCaseDoc.php.
deleteAllVisibleCookiesAndWait | ( | ) |
Calls deleteCookie with recurse=true on all cookies visible to the current page.
As noted on the documentation for deleteCookie, recurse=true can be much slower than simply deleting the cookies using a known domain/path.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 14181 of file SeleniumTestCaseDoc.php.
deleteCookie | ( | $name, | |
$optionsString | |||
) |
Delete a named cookie with specified path and domain.
Be careful; to delete a cookie, you need to delete it using the exact same path and domain that were used to create the cookie. If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also note that specifying a domain that isn't a subset of the current domain will usually fail. Since there's no way to discover at runtime the original path and domain of a given cookie, we've added an option called 'recurse' to try all sub-domains of the current domain with all paths that are a subset of the current path. Beware; this option can be slow. In big-O notation, it operates in O(n*m) time, where n is the number of dots in the domain name and m is the number of slashes in the path.
string | $name | the name of the cookie to be deleted |
string | $optionsString | options for the cookie. Currently supported options include 'path', 'domain' and 'recurse.' The optionsString's format is "path=/path/, domain=.foo.com, recurse=true". The order of options are irrelevant. Note that specifying a domain that isn't a subset of the current domain will usually fail. |
Definition at line 14207 of file SeleniumTestCaseDoc.php.
deleteCookieAndWait | ( | $name, | |
$optionsString | |||
) |
Delete a named cookie with specified path and domain.
Be careful; to delete a cookie, you need to delete it using the exact same path and domain that were used to create the cookie. If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also note that specifying a domain that isn't a subset of the current domain will usually fail. Since there's no way to discover at runtime the original path and domain of a given cookie, we've added an option called 'recurse' to try all sub-domains of the current domain with all paths that are a subset of the current path. Beware; this option can be slow. In big-O notation, it operates in O(n*m) time, where n is the number of dots in the domain name and m is the number of slashes in the path.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $name | the name of the cookie to be deleted |
string | $optionsString | options for the cookie. Currently supported options include 'path', 'domain' and 'recurse.' The optionsString's format is "path=/path/, domain=.foo.com, recurse=true". The order of options are irrelevant. Note that specifying a domain that isn't a subset of the current domain will usually fail. |
Definition at line 14237 of file SeleniumTestCaseDoc.php.
deselectPopUp | ( | ) |
Selects the main window.
Functionally equivalent to using [selectWindow()] and specifying no value for [windowID].
Definition at line 14251 of file SeleniumTestCaseDoc.php.
deselectPopUpAndWait | ( | ) |
Selects the main window.
Functionally equivalent to using [selectWindow()] and specifying no value for [windowID].
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 14269 of file SeleniumTestCaseDoc.php.
doubleClick | ( | $locator | ) |
Double clicks on a link, button, checkbox or radio button.
If the double click action causes a new page to load (like a link usually does), call waitForPageToLoad.
string | $locator | an element locator |
Definition at line 14285 of file SeleniumTestCaseDoc.php.
doubleClickAndWait | ( | $locator | ) |
Double clicks on a link, button, checkbox or radio button.
If the double click action causes a new page to load (like a link usually does), call waitForPageToLoad.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator |
Definition at line 14305 of file SeleniumTestCaseDoc.php.
doubleClickAt | ( | $locator, | |
$coordString | |||
) |
Doubleclicks on a link, button, checkbox or radio button.
If the action causes a new page to load (like a link usually does), call waitForPageToLoad.
string | $locator | an element locator |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 14323 of file SeleniumTestCaseDoc.php.
doubleClickAtAndWait | ( | $locator, | |
$coordString | |||
) |
Doubleclicks on a link, button, checkbox or radio button.
If the action causes a new page to load (like a link usually does), call waitForPageToLoad.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 14345 of file SeleniumTestCaseDoc.php.
dragAndDrop | ( | $locator, | |
$movementsString | |||
) |
Drags an element a certain distance and then drops it.
string | $locator | an element locator |
string | $movementsString | offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" |
Definition at line 14361 of file SeleniumTestCaseDoc.php.
dragAndDropAndWait | ( | $locator, | |
$movementsString | |||
) |
Drags an element a certain distance and then drops it.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator |
string | $movementsString | offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" |
Definition at line 14381 of file SeleniumTestCaseDoc.php.
dragAndDropToObject | ( | $locatorOfObjectToBeDragged, | |
$locatorOfDragDestinationObject | |||
) |
Drags an element and drops it on another element.
string | $locatorOfObjectToBeDragged | an element to be dragged |
string | $locatorOfDragDestinationObject | an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped |
Definition at line 14397 of file SeleniumTestCaseDoc.php.
dragAndDropToObjectAndWait | ( | $locatorOfObjectToBeDragged, | |
$locatorOfDragDestinationObject | |||
) |
Drags an element and drops it on another element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locatorOfObjectToBeDragged | an element to be dragged |
string | $locatorOfDragDestinationObject | an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped |
Definition at line 14417 of file SeleniumTestCaseDoc.php.
dragDrop | ( | $locator, | |
$movementsString | |||
) |
deprecated - use dragAndDrop instead.
string | $locator | an element locator |
string | $movementsString | offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" |
Definition at line 14434 of file SeleniumTestCaseDoc.php.
dragDropAndWait | ( | $locator, | |
$movementsString | |||
) |
deprecated - use dragAndDrop instead.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator |
string | $movementsString | offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" |
Definition at line 14455 of file SeleniumTestCaseDoc.php.
fireEvent | ( | $locator, | |
$eventName | |||
) |
Explicitly simulate an event, to trigger the corresponding "on<em>event</em>" handler.
string | $locator | an element locator (see Element Locators) |
string | $eventName | the event name, e.g. "focus" or "blur" |
Definition at line 14471 of file SeleniumTestCaseDoc.php.
fireEventAndWait | ( | $locator, | |
$eventName | |||
) |
Explicitly simulate an event, to trigger the corresponding "on<em>event</em>" handler.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $eventName | the event name, e.g. "focus" or "blur" |
Definition at line 14491 of file SeleniumTestCaseDoc.php.
focus | ( | $locator | ) |
Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field.
string | $locator | an element locator (see Element Locators) |
Definition at line 14507 of file SeleniumTestCaseDoc.php.
focusAndWait | ( | $locator | ) |
Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 14527 of file SeleniumTestCaseDoc.php.
getAlert | ( | ) |
Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
Definition at line 520 of file SeleniumTestCaseDoc.php.
getAllButtons | ( | ) |
Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
Definition at line 1019 of file SeleniumTestCaseDoc.php.
getAllFields | ( | ) |
Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
Definition at line 1260 of file SeleniumTestCaseDoc.php.
getAllLinks | ( | ) |
Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
Definition at line 1501 of file SeleniumTestCaseDoc.php.
getAllWindowIds | ( | ) |
Returns the IDs of all windows that the browser knows about in an array.
Definition at line 1736 of file SeleniumTestCaseDoc.php.
getAllWindowNames | ( | ) |
Returns the names of all windows that the browser knows about in an array.
Definition at line 1962 of file SeleniumTestCaseDoc.php.
getAllWindowTitles | ( | ) |
Returns the titles of all windows that the browser knows about in an array.
Definition at line 2188 of file SeleniumTestCaseDoc.php.
getAttribute | ( | $attributeLocator | ) |
Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
Definition at line 2427 of file SeleniumTestCaseDoc.php.
getAttributeFromAllWindows | ( | $attributeName | ) |
Returns an array of JavaScript property values from all known windows having one.
string | $attributeName | name of an attribute on the windows |
Definition at line 2679 of file SeleniumTestCaseDoc.php.
getBodyText | ( | ) |
Gets the entire text of the page.
Definition at line 2914 of file SeleniumTestCaseDoc.php.
getConfirmation | ( | ) |
Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
Definition at line 3421 of file SeleniumTestCaseDoc.php.
getCookie | ( | ) |
Return all cookies of the current page under test.
Definition at line 3930 of file SeleniumTestCaseDoc.php.
getCookieByName | ( | $name | ) |
Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
string | $name | the name of the cookie |
Definition at line 4161 of file SeleniumTestCaseDoc.php.
getCursorPosition | ( | $locator | ) |
Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
Definition at line 4643 of file SeleniumTestCaseDoc.php.
getElementHeight | ( | $locator | ) |
Retrieves the height of an element.
string | $locator | an element locator pointing to an element (see Element Locators) |
Definition at line 5162 of file SeleniumTestCaseDoc.php.
getElementIndex | ( | $locator | ) |
Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
string | $locator | an element locator pointing to an element (see Element Locators) |
Definition at line 5410 of file SeleniumTestCaseDoc.php.
getElementPositionLeft | ( | $locator | ) |
Retrieves the horizontal position of an element.
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
Definition at line 5893 of file SeleniumTestCaseDoc.php.
getElementPositionTop | ( | $locator | ) |
Retrieves the vertical position of an element.
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
Definition at line 6135 of file SeleniumTestCaseDoc.php.
getElementWidth | ( | $locator | ) |
Retrieves the width of an element.
string | $locator | an element locator pointing to an element (see Element Locators) |
Definition at line 6377 of file SeleniumTestCaseDoc.php.
getEval | ( | $script | ) |
Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
string | $script | the JavaScript snippet to run |
Definition at line 6643 of file SeleniumTestCaseDoc.php.
getExpression | ( | $expression | ) |
Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
string | $expression | the value to return |
Definition at line 6931 of file SeleniumTestCaseDoc.php.
getHtmlSource | ( | ) |
Returns the entire HTML source between the opening and closing "html" tags.
Definition at line 7176 of file SeleniumTestCaseDoc.php.
getLocation | ( | ) |
Gets the absolute URL of the current page.
Definition at line 7401 of file SeleniumTestCaseDoc.php.
getMouseSpeed | ( | ) |
Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
Definition at line 7626 of file SeleniumTestCaseDoc.php.
getPrompt | ( | ) |
Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
Definition at line 8139 of file SeleniumTestCaseDoc.php.
getSelectedId | ( | $selectLocator | ) |
Gets option element ID for selected option in the specified select element.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 8655 of file SeleniumTestCaseDoc.php.
getSelectedIds | ( | $selectLocator | ) |
Gets all option element IDs for selected options in the specified select or multi-select element.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 8898 of file SeleniumTestCaseDoc.php.
getSelectedIndex | ( | $selectLocator | ) |
Gets option index (option number, starting at 0) for selected option in the specified select element.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 9141 of file SeleniumTestCaseDoc.php.
getSelectedIndexes | ( | $selectLocator | ) |
Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 9387 of file SeleniumTestCaseDoc.php.
getSelectedLabel | ( | $selectLocator | ) |
Gets option label (visible text) for selected option in the specified select element.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 9635 of file SeleniumTestCaseDoc.php.
getSelectedLabels | ( | $selectLocator | ) |
Gets all option labels (visible text) for selected options in the specified select or multi-select element.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 9880 of file SeleniumTestCaseDoc.php.
getSelectedValue | ( | $selectLocator | ) |
Gets option value (value attribute) for selected option in the specified select element.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10127 of file SeleniumTestCaseDoc.php.
getSelectedValues | ( | $selectLocator | ) |
Gets all option values (value attributes) for selected options in the specified select or multi-select element.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10372 of file SeleniumTestCaseDoc.php.
getSelectOptions | ( | $selectLocator | ) |
Gets all option labels in the specified select drop-down.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 8412 of file SeleniumTestCaseDoc.php.
getSpeed | ( | ) |
Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
Definition at line 10851 of file SeleniumTestCaseDoc.php.
getTable | ( | $tableCellAddress | ) |
Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
Definition at line 11100 of file SeleniumTestCaseDoc.php.
getText | ( | $locator | ) |
Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
string | $locator | an element locator (see Element Locators) |
Definition at line 11356 of file SeleniumTestCaseDoc.php.
getTitle | ( | ) |
Gets the title of the current page.
Definition at line 11606 of file SeleniumTestCaseDoc.php.
getValue | ( | $locator | ) |
Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
string | $locator | an element locator (see Element Locators) |
Definition at line 11844 of file SeleniumTestCaseDoc.php.
getWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
$target | |||
) |
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.
string | $currentFrameString | starting frame |
string | $target | new frame (which might be relative to the current one) |
Definition at line 12374 of file SeleniumTestCaseDoc.php.
getWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
$target | |||
) |
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.
string | $currentWindowString | starting window |
string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12651 of file SeleniumTestCaseDoc.php.
getXpathCount | ( | $xpath | ) |
Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
Definition at line 12916 of file SeleniumTestCaseDoc.php.
goBack | ( | ) |
Simulates the user clicking the "back" button on their browser.
Definition at line 14539 of file SeleniumTestCaseDoc.php.
goBackAndWait | ( | ) |
Simulates the user clicking the "back" button on their browser.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 14555 of file SeleniumTestCaseDoc.php.
highlight | ( | $locator | ) |
Briefly changes the backgroundColor of the specified element yellow.
Useful for debugging.
string | $locator | an element locator (see Element Locators) |
Definition at line 14572 of file SeleniumTestCaseDoc.php.
highlightAndWait | ( | $locator | ) |
Briefly changes the backgroundColor of the specified element yellow.
Useful for debugging.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 14593 of file SeleniumTestCaseDoc.php.
ignoreAttributesWithoutValue | ( | $ignore | ) |
Specifies whether Selenium will ignore xpath attributes that have no value, i.e. are the empty string, when using the non-native xpath evaluation engine.
You'd want to do this for performance reasons in IE. However, this could break certain xpaths, for example an xpath that looks for an attribute whose value is NOT the empty string. The hope is that such xpaths are relatively rare, but the user should have the option of using them. Note that this only influences xpath evaluation when using the ajaxslt engine (i.e. not "javascript-xpath").
string | $ignore | boolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness. |
Definition at line 14614 of file SeleniumTestCaseDoc.php.
ignoreAttributesWithoutValueAndWait | ( | $ignore | ) |
Specifies whether Selenium will ignore xpath attributes that have no value, i.e. are the empty string, when using the non-native xpath evaluation engine.
You'd want to do this for performance reasons in IE. However, this could break certain xpaths, for example an xpath that looks for an attribute whose value is NOT the empty string. The hope is that such xpaths are relatively rare, but the user should have the option of using them. Note that this only influences xpath evaluation when using the ajaxslt engine (i.e. not "javascript-xpath").
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $ignore | boolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness. |
Definition at line 14639 of file SeleniumTestCaseDoc.php.
isAlertPresent | ( | ) |
Has an alert occurred?
This function never throws an exception .
Definition at line 790 of file SeleniumTestCaseDoc.php.
isChecked | ( | $locator | ) |
Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3148 of file SeleniumTestCaseDoc.php.
isConfirmationPresent | ( | ) |
Has confirm() been called?
This function never throws an exception .
Definition at line 3707 of file SeleniumTestCaseDoc.php.
isCookiePresent | ( | $name | ) |
Returns true if a cookie with the specified name is present, or false otherwise.
string | $name | the name of the cookie |
Definition at line 4395 of file SeleniumTestCaseDoc.php.
isEditable | ( | $locator | ) |
Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
string | $locator | an element locator (see Element Locators) |
Definition at line 4917 of file SeleniumTestCaseDoc.php.
isElementPresent | ( | $locator | ) |
Verifies that the specified element is somewhere on the page.
string | $locator | an element locator (see Element Locators) |
Definition at line 5659 of file SeleniumTestCaseDoc.php.
isOrdered | ( | $locator1, | |
$locator2 | |||
) |
Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
string | $locator1 | an element locator pointing to the first element (see Element Locators) |
string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 7867 of file SeleniumTestCaseDoc.php.
isPromptPresent | ( | ) |
Has a prompt occurred?
This function never throws an exception .
Definition at line 13155 of file SeleniumTestCaseDoc.php.
isSomethingSelected | ( | $selectLocator | ) |
Determines whether some option in a drop-down menu is selected.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10615 of file SeleniumTestCaseDoc.php.
isTextPresent | ( | $pattern | ) |
Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13381 of file SeleniumTestCaseDoc.php.
isVisible | ( | $locator | ) |
Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
string | $locator | an element locator (see Element Locators) |
Definition at line 12105 of file SeleniumTestCaseDoc.php.
keyDown | ( | $locator, | |
$keySequence | |||
) |
Simulates a user pressing a key (without releasing it yet).
string | $locator | an element locator (see Element Locators) |
string | $keySequence | Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". |
Definition at line 14657 of file SeleniumTestCaseDoc.php.
keyDownAndWait | ( | $locator, | |
$keySequence | |||
) |
Simulates a user pressing a key (without releasing it yet).
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $keySequence | Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". |
Definition at line 14679 of file SeleniumTestCaseDoc.php.
keyDownNative | ( | $keycode | ) |
Simulates a user pressing a key (without releasing it yet) by sending a native operating system keystroke.
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command.
string | $keycode | an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! |
Definition at line 14699 of file SeleniumTestCaseDoc.php.
keyDownNativeAndWait | ( | $keycode | ) |
Simulates a user pressing a key (without releasing it yet) by sending a native operating system keystroke.
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $keycode | an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! |
Definition at line 14723 of file SeleniumTestCaseDoc.php.
keyPress | ( | $locator, | |
$keySequence | |||
) |
Simulates a user pressing and releasing a key.
string | $locator | an element locator (see Element Locators) |
string | $keySequence | Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". |
Definition at line 14741 of file SeleniumTestCaseDoc.php.
keyPressAndWait | ( | $locator, | |
$keySequence | |||
) |
Simulates a user pressing and releasing a key.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $keySequence | Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". |
Definition at line 14763 of file SeleniumTestCaseDoc.php.
keyPressNative | ( | $keycode | ) |
Simulates a user pressing and releasing a key by sending a native operating system keystroke.
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command.
string | $keycode | an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! |
Definition at line 14783 of file SeleniumTestCaseDoc.php.
keyPressNativeAndWait | ( | $keycode | ) |
Simulates a user pressing and releasing a key by sending a native operating system keystroke.
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $keycode | an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! |
Definition at line 14807 of file SeleniumTestCaseDoc.php.
keyUp | ( | $locator, | |
$keySequence | |||
) |
Simulates a user releasing a key.
string | $locator | an element locator (see Element Locators) |
string | $keySequence | Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". |
Definition at line 14825 of file SeleniumTestCaseDoc.php.
keyUpAndWait | ( | $locator, | |
$keySequence | |||
) |
Simulates a user releasing a key.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $keySequence | Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". |
Definition at line 14847 of file SeleniumTestCaseDoc.php.
keyUpNative | ( | $keycode | ) |
Simulates a user releasing a key by sending a native operating system keystroke.
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command.
string | $keycode | an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! |
Definition at line 14867 of file SeleniumTestCaseDoc.php.
keyUpNativeAndWait | ( | $keycode | ) |
Simulates a user releasing a key by sending a native operating system keystroke.
This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $keycode | an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! |
Definition at line 14891 of file SeleniumTestCaseDoc.php.
metaKeyDown | ( | ) |
Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.
Definition at line 14903 of file SeleniumTestCaseDoc.php.
metaKeyDownAndWait | ( | ) |
Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 14919 of file SeleniumTestCaseDoc.php.
metaKeyUp | ( | ) |
Release the meta key.
Definition at line 14931 of file SeleniumTestCaseDoc.php.
metaKeyUpAndWait | ( | ) |
Release the meta key.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 14947 of file SeleniumTestCaseDoc.php.
mouseDown | ( | $locator | ) |
Simulates a user pressing the left mouse button (without releasing it yet) on the specified element.
string | $locator | an element locator (see Element Locators) |
Definition at line 14962 of file SeleniumTestCaseDoc.php.
mouseDownAndWait | ( | $locator | ) |
Simulates a user pressing the left mouse button (without releasing it yet) on the specified element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 14981 of file SeleniumTestCaseDoc.php.
mouseDownAt | ( | $locator, | |
$coordString | |||
) |
Simulates a user pressing the left mouse button (without releasing it yet) at the specified location.
string | $locator | an element locator (see Element Locators) |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 14998 of file SeleniumTestCaseDoc.php.
mouseDownAtAndWait | ( | $locator, | |
$coordString | |||
) |
Simulates a user pressing the left mouse button (without releasing it yet) at the specified location.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 15019 of file SeleniumTestCaseDoc.php.
mouseMove | ( | $locator | ) |
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
string | $locator | an element locator (see Element Locators) |
Definition at line 15034 of file SeleniumTestCaseDoc.php.
mouseMoveAndWait | ( | $locator | ) |
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 15053 of file SeleniumTestCaseDoc.php.
mouseMoveAt | ( | $locator, | |
$coordString | |||
) |
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
string | $locator | an element locator (see Element Locators) |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 15070 of file SeleniumTestCaseDoc.php.
mouseMoveAtAndWait | ( | $locator, | |
$coordString | |||
) |
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 15091 of file SeleniumTestCaseDoc.php.
mouseOut | ( | $locator | ) |
Simulates a user moving the mouse pointer away from the specified element.
string | $locator | an element locator (see Element Locators) |
Definition at line 15106 of file SeleniumTestCaseDoc.php.
mouseOutAndWait | ( | $locator | ) |
Simulates a user moving the mouse pointer away from the specified element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 15125 of file SeleniumTestCaseDoc.php.
mouseOver | ( | $locator | ) |
Simulates a user hovering a mouse over the specified element.
string | $locator | an element locator (see Element Locators) |
Definition at line 15140 of file SeleniumTestCaseDoc.php.
mouseOverAndWait | ( | $locator | ) |
Simulates a user hovering a mouse over the specified element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 15159 of file SeleniumTestCaseDoc.php.
mouseUp | ( | $locator | ) |
Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) on the specified element.
string | $locator | an element locator (see Element Locators) |
Definition at line 15175 of file SeleniumTestCaseDoc.php.
mouseUpAndWait | ( | $locator | ) |
Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) on the specified element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 15195 of file SeleniumTestCaseDoc.php.
mouseUpAt | ( | $locator, | |
$coordString | |||
) |
Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) at the specified location.
string | $locator | an element locator (see Element Locators) |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 15213 of file SeleniumTestCaseDoc.php.
mouseUpAtAndWait | ( | $locator, | |
$coordString | |||
) |
Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) at the specified location.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 15235 of file SeleniumTestCaseDoc.php.
mouseUpRight | ( | $locator | ) |
Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element.
string | $locator | an element locator (see Element Locators) |
Definition at line 15251 of file SeleniumTestCaseDoc.php.
mouseUpRightAndWait | ( | $locator | ) |
Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 15271 of file SeleniumTestCaseDoc.php.
mouseUpRightAt | ( | $locator, | |
$coordString | |||
) |
Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) at the specified location.
string | $locator | an element locator (see Element Locators) |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 15289 of file SeleniumTestCaseDoc.php.
mouseUpRightAtAndWait | ( | $locator, | |
$coordString | |||
) |
Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) at the specified location.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $coordString | specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. |
Definition at line 15311 of file SeleniumTestCaseDoc.php.
open | ( | $url | ) |
Opens an URL in the test frame.
This accepts both relative and absolute URLs. The "open" command waits for the page to load before proceeding, ie. the "AndWait" suffix is implicit. Note: The URL must be on the same domain as the runner HTML due to security restrictions in the browser (Same Origin Policy). If you need to open an URL on another domain, use the Selenium Server to start a new browser session on that domain.
string | $url | the URL to open; may be relative or absolute |
Definition at line 15328 of file SeleniumTestCaseDoc.php.
openWindow | ( | $url, | |
$windowID | |||
) |
Opens a popup window (if a window with that ID isn't already open).
After opening the window, you'll need to select it using the selectWindow command.
This 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").
string | $url | the URL to open, which can be blank |
string | $windowID | the JavaScript window ID of the window to select |
Definition at line 15350 of file SeleniumTestCaseDoc.php.
openWindowAndWait | ( | $url, | |
$windowID | |||
) |
Opens a popup window (if a window with that ID isn't already open).
After opening the window, you'll need to select it using the selectWindow command.
This 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").
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $url | the URL to open, which can be blank |
string | $windowID | the JavaScript window ID of the window to select |
Definition at line 15376 of file SeleniumTestCaseDoc.php.
pause | ( | $waitTime | ) |
Wait for the specified amount of time (in milliseconds).
string | $waitTime | the amount of time to sleep (in milliseconds) |
Definition at line 15388 of file SeleniumTestCaseDoc.php.
refresh | ( | ) |
Simulates the user clicking the "Refresh" button on their browser.
Definition at line 15400 of file SeleniumTestCaseDoc.php.
refreshAndWait | ( | ) |
Simulates the user clicking the "Refresh" button on their browser.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 15416 of file SeleniumTestCaseDoc.php.
removeAllSelections | ( | $locator | ) |
Unselects all of the selected options in a multi-select element.
string | $locator | an element locator identifying a multi-select box (see Element Locators) |
Definition at line 15431 of file SeleniumTestCaseDoc.php.
removeAllSelectionsAndWait | ( | $locator | ) |
Unselects all of the selected options in a multi-select element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator identifying a multi-select box (see Element Locators) |
Definition at line 15450 of file SeleniumTestCaseDoc.php.
removeScript | ( | $scriptTagId | ) |
Removes a script tag from the Selenium document identified by the given id.
Does nothing if the referenced tag doesn't exist.
string | $scriptTagId | the id of the script element to remove. |
Definition at line 15466 of file SeleniumTestCaseDoc.php.
removeScriptAndWait | ( | $scriptTagId | ) |
Removes a script tag from the Selenium document identified by the given id.
Does nothing if the referenced tag doesn't exist.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $scriptTagId | the id of the script element to remove. |
Definition at line 15486 of file SeleniumTestCaseDoc.php.
removeSelection | ( | $locator, | |
$optionLocator | |||
) |
Remove a selection from the set of selected options in a multi-select element using an option locator.
See select() for details of option locators.
string | $locator | an element locator identifying a multi-select box (see Element Locators) |
string | $optionLocator | an option locator (a label by default) |
Definition at line 15504 of file SeleniumTestCaseDoc.php.
removeSelectionAndWait | ( | $locator, | |
$optionLocator | |||
) |
Remove a selection from the set of selected options in a multi-select element using an option locator.
See select() for details of option locators.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator identifying a multi-select box (see Element Locators) |
string | $optionLocator | an option locator (a label by default) |
Definition at line 15526 of file SeleniumTestCaseDoc.php.
retrieveLastRemoteControlLogs | ( | ) |
Retrieve the last messages logged on a specific remote control.
Useful for error reports, especially when running multiple remote controls in a distributed environment. The maximum number of log messages that can be retrieve is configured on remote control startup.
Definition at line 15539 of file SeleniumTestCaseDoc.php.
rollup | ( | $rollupName, | |
$kwargs | |||
) |
Executes a command rollup, which is a series of commands with a unique name, and optionally arguments that control the generation of the set of commands.
If any one of the rolled-up commands fails, the rollup is considered to have failed. Rollups may also contain nested rollups.
string | $rollupName | the name of the rollup command |
string | $kwargs | keyword arguments string that influences how the rollup expands into commands |
Definition at line 15558 of file SeleniumTestCaseDoc.php.
rollupAndWait | ( | $rollupName, | |
$kwargs | |||
) |
Executes a command rollup, which is a series of commands with a unique name, and optionally arguments that control the generation of the set of commands.
If any one of the rolled-up commands fails, the rollup is considered to have failed. Rollups may also contain nested rollups.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $rollupName | the name of the rollup command |
string | $kwargs | keyword arguments string that influences how the rollup expands into commands |
Definition at line 15581 of file SeleniumTestCaseDoc.php.
runScript | ( | $script | ) |
Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command.
Scripts run in this way can often be debugged more easily than scripts executed using Selenium's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception.
string | $script | the JavaScript snippet to run |
Definition at line 15600 of file SeleniumTestCaseDoc.php.
runScriptAndWait | ( | $script | ) |
Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command.
Scripts run in this way can often be debugged more easily than scripts executed using Selenium's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $script | the JavaScript snippet to run |
Definition at line 15623 of file SeleniumTestCaseDoc.php.
select | ( | $selectLocator, | |
$optionLocator | |||
) |
Select an option from a drop-down using an option locator.
Option locators provide different ways of specifying options of an HTML Select element(e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification).There are several forms of Select Option Locator.
If no option locator prefix is provided, the default behaviour is to match on label.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $optionLocator | an option locator (a label by default) |
Definition at line 15656 of file SeleniumTestCaseDoc.php.
selectAndWait | ( | $selectLocator, | |
$optionLocator | |||
) |
Select an option from a drop-down using an option locator.
Option locators provide different ways of specifying options of an HTML Select element(e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification).There are several forms of Select Option Locator.
If no option locator prefix is provided, the default behaviour is to match on label.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $optionLocator | an option locator (a label by default) |
Definition at line 15693 of file SeleniumTestCaseDoc.php.
selectFrame | ( | $locator | ) |
Selects a frame within the current window. (You may invoke this command multiple times to select nested frames.) To select the parent frame, use "relative=parent" as a locator; to select the top frame, use "relative=top".
You can also select a frame by its 0-based index number; select the first frame with "index=0", or the third frame with "index=2".
You may also use a DOM expression to identify the frame you want directly, like this: [dom=frames["main"].frames["subframe"]] .
string | $locator | an element locator identifying a frame or iframe (see Element Locators) |
Definition at line 15713 of file SeleniumTestCaseDoc.php.
selectPopUp | ( | $windowID | ) |
Simplifies the process of selecting a popup window (and does not offer functionality beyond what [selectWindow()] already provides).
string | $windowID | an identifier for the popup window, which can take on a number of different meanings |
Definition at line 15738 of file SeleniumTestCaseDoc.php.
selectPopUpAndWait | ( | $windowID | ) |
Simplifies the process of selecting a popup window (and does not offer functionality beyond what [selectWindow()] already provides).
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $windowID | an identifier for the popup window, which can take on a number of different meanings |
Definition at line 15767 of file SeleniumTestCaseDoc.php.
selectWindow | ( | $windowID | ) |
Selects a popup window using a window locator; once a popup window has been selected, all commands go to that window.
To select the main window again, use null as the target.
Window 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").
string | $windowID | the JavaScript window ID of the window to select |
Definition at line 15823 of file SeleniumTestCaseDoc.php.
setBrowserLogLevel | ( | $logLevel | ) |
Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
Valid logLevel strings are: "debug", "info", "warn", "error" or "off". To see the browser logs, you need to either show the log window in GUI mode, or enable browser-side logging in Selenium RC.
string | $logLevel | one of the following: "debug", "info", "warn", "error" or "off" |
Definition at line 15840 of file SeleniumTestCaseDoc.php.
setBrowserLogLevelAndWait | ( | $logLevel | ) |
Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
Valid logLevel strings are: "debug", "info", "warn", "error" or "off". To see the browser logs, you need to either show the log window in GUI mode, or enable browser-side logging in Selenium RC.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $logLevel | one of the following: "debug", "info", "warn", "error" or "off" |
Definition at line 15861 of file SeleniumTestCaseDoc.php.
setContext | ( | $context | ) |
Writes a message to the status bar and adds a note to the browser-side log.
string | $context | the message to be sent to the browser |
Definition at line 15873 of file SeleniumTestCaseDoc.php.
setCursorPosition | ( | $locator, | |
$position | |||
) |
Moves the text cursor to the specified position in the given input element or textarea.
This method will fail if the specified element isn't an input element or textarea.
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $position | the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field. |
Definition at line 15893 of file SeleniumTestCaseDoc.php.
setCursorPositionAndWait | ( | $locator, | |
$position | |||
) |
Moves the text cursor to the specified position in the given input element or textarea.
This method will fail if the specified element isn't an input element or textarea.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $position | the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field. |
Definition at line 15917 of file SeleniumTestCaseDoc.php.
setMouseSpeed | ( | $pixels | ) |
Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
Setting this value to 0 means that we'll send a "mousemove" event to every single pixel in between the start location and the end location; that can be very slow, and may cause some browsers to force the JavaScript to timeout.
If the mouse speed is greater than the distance between the two dragged objects, we'll just send one "mousemove" at the start location and then one final one at the end location.
string | $pixels | the number of pixels between "mousemove" events |
Definition at line 15938 of file SeleniumTestCaseDoc.php.
setMouseSpeedAndWait | ( | $pixels | ) |
Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
Setting this value to 0 means that we'll send a "mousemove" event to every single pixel in between the start location and the end location; that can be very slow, and may cause some browsers to force the JavaScript to timeout.
If the mouse speed is greater than the distance between the two dragged objects, we'll just send one "mousemove" at the start location and then one final one at the end location.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $pixels | the number of pixels between "mousemove" events |
Definition at line 15963 of file SeleniumTestCaseDoc.php.
setSpeed | ( | $value | ) |
Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds.
string | $value | the number of milliseconds to pause after operation |
Definition at line 15979 of file SeleniumTestCaseDoc.php.
setSpeedAndWait | ( | $value | ) |
Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $value | the number of milliseconds to pause after operation |
Definition at line 15999 of file SeleniumTestCaseDoc.php.
shiftKeyDown | ( | ) |
Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
Definition at line 16011 of file SeleniumTestCaseDoc.php.
shiftKeyDownAndWait | ( | ) |
Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 16027 of file SeleniumTestCaseDoc.php.
shiftKeyUp | ( | ) |
Release the shift key.
Definition at line 16039 of file SeleniumTestCaseDoc.php.
shiftKeyUpAndWait | ( | ) |
Release the shift key.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 16055 of file SeleniumTestCaseDoc.php.
shutDownSeleniumServer | ( | ) |
Kills the running Selenium Server and all browser sessions.
After you run this command, you will no longer be able to send commands to the server; you can't remotely start the server once it has been stopped. Normally you should prefer to run the "stop" command, which terminates the current browser session, rather than shutting down the entire server.
Definition at line 16069 of file SeleniumTestCaseDoc.php.
store | ( | $expression, | |
$variableName | |||
) |
This command is a synonym for storeExpression.
string | $expression | the value to store |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 16083 of file SeleniumTestCaseDoc.php.
storeAlert | ( | $variableName | ) |
Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 554 of file SeleniumTestCaseDoc.php.
storeAlertPresent | ( | $variableName | ) |
Has an alert occurred?
This function never throws an exception .
true if there is an alert (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 817 of file SeleniumTestCaseDoc.php.
storeAllButtons | ( | $variableName | ) |
Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1046 of file SeleniumTestCaseDoc.php.
storeAllFields | ( | $variableName | ) |
Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1287 of file SeleniumTestCaseDoc.php.
storeAllLinks | ( | $variableName | ) |
Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1528 of file SeleniumTestCaseDoc.php.
storeAllWindowIds | ( | $variableName | ) |
Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about. (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1762 of file SeleniumTestCaseDoc.php.
storeAllWindowNames | ( | $variableName | ) |
Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about. (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1988 of file SeleniumTestCaseDoc.php.
storeAllWindowTitles | ( | $variableName | ) |
Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about. (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 2214 of file SeleniumTestCaseDoc.php.
storeAttribute | ( | $attributeLocator, | |
$variableName | |||
) |
Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute (see Stored Variables)
string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 2456 of file SeleniumTestCaseDoc.php.
storeAttributeFromAllWindows | ( | $attributeName, | |
$variableName | |||
) |
Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows. (see Stored Variables)
string | $attributeName | name of an attribute on the windows |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 2706 of file SeleniumTestCaseDoc.php.
storeBodyText | ( | $variableName | ) |
Gets the entire text of the page.
the entire text of the page (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 2939 of file SeleniumTestCaseDoc.php.
storeChecked | ( | $locator, | |
$variableName | |||
) |
Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise (see Stored Variables)
string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 3177 of file SeleniumTestCaseDoc.php.
storeConfirmation | ( | $variableName | ) |
Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 3459 of file SeleniumTestCaseDoc.php.
storeConfirmationPresent | ( | $variableName | ) |
Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 3734 of file SeleniumTestCaseDoc.php.
storeCookie | ( | $variableName | ) |
Return all cookies of the current page under test.
all cookies of the current page under test (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 3955 of file SeleniumTestCaseDoc.php.
storeCookieByName | ( | $name, | |
$variableName | |||
) |
Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie (see Stored Variables)
string | $name | the name of the cookie |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 4187 of file SeleniumTestCaseDoc.php.
storeCookiePresent | ( | $name, | |
$variableName | |||
) |
Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise. (see Stored Variables)
string | $name | the name of the cookie |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 4422 of file SeleniumTestCaseDoc.php.
storeCursorPosition | ( | $locator, | |
$variableName | |||
) |
Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field (see Stored Variables)
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 4676 of file SeleniumTestCaseDoc.php.
storeEditable | ( | $locator, | |
$variableName | |||
) |
Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise (see Stored Variables)
string | $locator | an element locator (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 4947 of file SeleniumTestCaseDoc.php.
storeElementHeight | ( | $locator, | |
$variableName | |||
) |
Retrieves the height of an element.
height of an element in pixels (see Stored Variables)
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 5189 of file SeleniumTestCaseDoc.php.
storeElementIndex | ( | $locator, | |
$variableName | |||
) |
Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0) (see Stored Variables)
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 5440 of file SeleniumTestCaseDoc.php.
storeElementPositionLeft | ( | $locator, | |
$variableName | |||
) |
Retrieves the horizontal position of an element.
of pixels from the edge of the frame. (see Stored Variables)
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 5920 of file SeleniumTestCaseDoc.php.
storeElementPositionTop | ( | $locator, | |
$variableName | |||
) |
Retrieves the vertical position of an element.
of pixels from the edge of the frame. (see Stored Variables)
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 6162 of file SeleniumTestCaseDoc.php.
storeElementPresent | ( | $locator, | |
$variableName | |||
) |
Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise (see Stored Variables)
string | $locator | an element locator (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 5686 of file SeleniumTestCaseDoc.php.
storeElementWidth | ( | $locator, | |
$variableName | |||
) |
Retrieves the width of an element.
width of an element in pixels (see Stored Variables)
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 6404 of file SeleniumTestCaseDoc.php.
storeEval | ( | $script, | |
$variableName | |||
) |
Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet (see Stored Variables)
string | $script | the JavaScript snippet to run |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 6678 of file SeleniumTestCaseDoc.php.
storeExpression | ( | $expression, | |
$variableName | |||
) |
Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in (see Stored Variables)
string | $expression | the value to return |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 6960 of file SeleniumTestCaseDoc.php.
storeHtmlSource | ( | $variableName | ) |
Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 7201 of file SeleniumTestCaseDoc.php.
storeLocation | ( | $variableName | ) |
Gets the absolute URL of the current page.
the absolute URL of the current page (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 7426 of file SeleniumTestCaseDoc.php.
storeMouseSpeed | ( | $variableName | ) |
Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10) (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 7652 of file SeleniumTestCaseDoc.php.
storeOrdered | ( | $locator1, | |
$locator2, | |||
$variableName | |||
) |
Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise (see Stored Variables)
string | $locator1 | an element locator pointing to the first element (see Element Locators) |
string | $locator2 | an element locator pointing to the second element (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 7899 of file SeleniumTestCaseDoc.php.
storePrompt | ( | $variableName | ) |
Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 8173 of file SeleniumTestCaseDoc.php.
storePromptPresent | ( | $variableName | ) |
Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 13182 of file SeleniumTestCaseDoc.php.
storeSelectedId | ( | $selectLocator, | |
$variableName | |||
) |
Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 8683 of file SeleniumTestCaseDoc.php.
storeSelectedIds | ( | $selectLocator, | |
$variableName | |||
) |
Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 8926 of file SeleniumTestCaseDoc.php.
storeSelectedIndex | ( | $selectLocator, | |
$variableName | |||
) |
Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 9169 of file SeleniumTestCaseDoc.php.
storeSelectedIndexes | ( | $selectLocator, | |
$variableName | |||
) |
Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 9416 of file SeleniumTestCaseDoc.php.
storeSelectedLabel | ( | $selectLocator, | |
$variableName | |||
) |
Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 9663 of file SeleniumTestCaseDoc.php.
storeSelectedLabels | ( | $selectLocator, | |
$variableName | |||
) |
Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 9908 of file SeleniumTestCaseDoc.php.
storeSelectedValue | ( | $selectLocator, | |
$variableName | |||
) |
Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 10155 of file SeleniumTestCaseDoc.php.
storeSelectedValues | ( | $selectLocator, | |
$variableName | |||
) |
Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 10400 of file SeleniumTestCaseDoc.php.
storeSelectOptions | ( | $selectLocator, | |
$variableName | |||
) |
Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 8440 of file SeleniumTestCaseDoc.php.
storeSomethingSelected | ( | $selectLocator, | |
$variableName | |||
) |
Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise (see Stored Variables)
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 10643 of file SeleniumTestCaseDoc.php.
storeSpeed | ( | $variableName | ) |
Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds. (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 10878 of file SeleniumTestCaseDoc.php.
storeTable | ( | $tableCellAddress, | |
$variableName | |||
) |
Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell (see Stored Variables)
string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 11128 of file SeleniumTestCaseDoc.php.
storeText | ( | $locator, | |
$variableName | |||
) |
Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element (see Stored Variables)
string | $locator | an element locator (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 11386 of file SeleniumTestCaseDoc.php.
storeTextPresent | ( | $pattern, | |
$variableName | |||
) |
Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise (see Stored Variables)
string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 13409 of file SeleniumTestCaseDoc.php.
storeTitle | ( | $variableName | ) |
Gets the title of the current page.
the title of the current page (see Stored Variables)
string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 11631 of file SeleniumTestCaseDoc.php.
storeValue | ( | $locator, | |
$variableName | |||
) |
Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements (see Stored Variables)
string | $locator | an element locator (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 11874 of file SeleniumTestCaseDoc.php.
storeVisible | ( | $locator, | |
$variableName | |||
) |
Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise (see Stored Variables)
string | $locator | an element locator (see Element Locators) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 12137 of file SeleniumTestCaseDoc.php.
storeWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
$target, | |||
$variableName | |||
) |
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.
true if the new frame is this code's window (see Stored Variables)
string | $currentFrameString | starting frame |
string | $target | new frame (which might be relative to the current one) |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 12406 of file SeleniumTestCaseDoc.php.
storeWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
$target, | |||
$variableName | |||
) |
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.
true if the new window is this code's window (see Stored Variables)
string | $currentWindowString | starting window |
string | $target | new window (which might be relative to the current one, e.g., "_parent") |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 12683 of file SeleniumTestCaseDoc.php.
storeXpathCount | ( | $xpath, | |
$variableName | |||
) |
Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath (see Stored Variables)
string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 12943 of file SeleniumTestCaseDoc.php.
submit | ( | $formLocator | ) |
Submit the specified form.
This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms.
string | $formLocator | an element locator for the form you want to submit (see Element Locators) |
Definition at line 16100 of file SeleniumTestCaseDoc.php.
submitAndWait | ( | $formLocator | ) |
Submit the specified form.
This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $formLocator | an element locator for the form you want to submit (see Element Locators) |
Definition at line 16121 of file SeleniumTestCaseDoc.php.
type | ( | $locator, | |
$value | |||
) |
Sets the value of an input field, as though you typed it in.
Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text.
string | $locator | an element locator (see Element Locators) |
string | $value | the value to type |
Definition at line 16140 of file SeleniumTestCaseDoc.php.
typeAndWait | ( | $locator, | |
$value | |||
) |
Sets the value of an input field, as though you typed it in.
Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $value | the value to type |
Definition at line 16163 of file SeleniumTestCaseDoc.php.
typeKeys | ( | $locator, | |
$value | |||
) |
Simulates keystroke events on the specified element, as though you typed the value key-by-key.
This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.
Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field.
In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.
string | $locator | an element locator (see Element Locators) |
string | $value | the value to type |
Definition at line 16191 of file SeleniumTestCaseDoc.php.
typeKeysAndWait | ( | $locator, | |
$value | |||
) |
Simulates keystroke events on the specified element, as though you typed the value key-by-key.
This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.
Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field.
In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
string | $value | the value to type |
Definition at line 16223 of file SeleniumTestCaseDoc.php.
uncheck | ( | $locator | ) |
Uncheck a toggle-button (checkbox/radio).
string | $locator | an element locator (see Element Locators) |
Definition at line 16238 of file SeleniumTestCaseDoc.php.
uncheckAndWait | ( | $locator | ) |
Uncheck a toggle-button (checkbox/radio).
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $locator | an element locator (see Element Locators) |
Definition at line 16257 of file SeleniumTestCaseDoc.php.
useXpathLibrary | ( | $libraryName | ) |
Allows choice of one of the available libraries.
string | $libraryName | name of the desired library Only the following three can be chosen: <ul> <li>"ajaxslt" - Google's library</li> <li>"javascript-xpath" - Cybozu Labs' faster library</li> <li>"default" - The default library. Currently the default library is "ajaxslt" .</li> </ul> If libraryName isn't one of these three, then no change will be made. |
Definition at line 16280 of file SeleniumTestCaseDoc.php.
useXpathLibraryAndWait | ( | $libraryName | ) |
Allows choice of one of the available libraries.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
string | $libraryName | name of the desired library Only the following three can be chosen: <ul> <li>"ajaxslt" - Google's library</li> <li>"javascript-xpath" - Cybozu Labs' faster library</li> <li>"default" - The default library. Currently the default library is "ajaxslt" .</li> </ul> If libraryName isn't one of these three, then no change will be made. |
Definition at line 16307 of file SeleniumTestCaseDoc.php.
verifyAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlert()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 593 of file SeleniumTestCaseDoc.php.
verifyAlertNotPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlertNotPresent()).
Definition at line 846 of file SeleniumTestCaseDoc.php.
verifyAlertPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlertPresent()).
Definition at line 875 of file SeleniumTestCaseDoc.php.
verifyAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllButtons()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1078 of file SeleniumTestCaseDoc.php.
verifyAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllFields()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1319 of file SeleniumTestCaseDoc.php.
verifyAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllLinks()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1560 of file SeleniumTestCaseDoc.php.
verifyAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowIds()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1792 of file SeleniumTestCaseDoc.php.
verifyAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowNames()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2018 of file SeleniumTestCaseDoc.php.
verifyAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowTitles()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2244 of file SeleniumTestCaseDoc.php.
verifyAttribute | ( | $attributeLocator, | |
$pattern | |||
) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAttribute()).
string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2490 of file SeleniumTestCaseDoc.php.
verifyAttributeFromAllWindows | ( | $attributeName, | |
$pattern | |||
) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAttributeFromAllWindows()).
string | $attributeName | name of an attribute on the windows |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2738 of file SeleniumTestCaseDoc.php.
verifyBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertBodyText()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2969 of file SeleniumTestCaseDoc.php.
verifyChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertChecked()).
string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3209 of file SeleniumTestCaseDoc.php.
verifyConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmation()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3501 of file SeleniumTestCaseDoc.php.
verifyConfirmationNotPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmationNotPresent()).
Definition at line 3763 of file SeleniumTestCaseDoc.php.
verifyConfirmationPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmationPresent()).
Definition at line 3792 of file SeleniumTestCaseDoc.php.
verifyCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookie()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3985 of file SeleniumTestCaseDoc.php.
verifyCookieByName | ( | $name, | |
$pattern | |||
) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookieByName()).
string | $name | the name of the cookie |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4219 of file SeleniumTestCaseDoc.php.
verifyCookieNotPresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookieNotPresent()).
string | $name | the name of the cookie |
Definition at line 4451 of file SeleniumTestCaseDoc.php.
verifyCookiePresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookiePresent()).
string | $name | the name of the cookie |
Definition at line 4480 of file SeleniumTestCaseDoc.php.
verifyCursorPosition | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCursorPosition()).
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4714 of file SeleniumTestCaseDoc.php.
verifyEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertEditable()).
string | $locator | an element locator (see Element Locators) |
Definition at line 4979 of file SeleniumTestCaseDoc.php.
verifyElementHeight | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the height of an element.
height of an element in pixels
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementHeight()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5221 of file SeleniumTestCaseDoc.php.
verifyElementIndex | ( | $locator, | |
$pattern | |||
) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementIndex()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5474 of file SeleniumTestCaseDoc.php.
verifyElementNotPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementNotPresent()).
string | $locator | an element locator (see Element Locators) |
Definition at line 5716 of file SeleniumTestCaseDoc.php.
verifyElementPositionLeft | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPositionLeft()).
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5952 of file SeleniumTestCaseDoc.php.
verifyElementPositionTop | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPositionTop()).
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6194 of file SeleniumTestCaseDoc.php.
verifyElementPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPresent()).
string | $locator | an element locator (see Element Locators) |
Definition at line 5746 of file SeleniumTestCaseDoc.php.
verifyElementWidth | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the width of an element.
width of an element in pixels
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementWidth()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6436 of file SeleniumTestCaseDoc.php.
verifyEval | ( | $script, | |
$pattern | |||
) |
Assertion: Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet
If assertion will fail the test, it will continue to run the test case (in contrast to the assertEval()).
string | $script | the JavaScript snippet to run |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6718 of file SeleniumTestCaseDoc.php.
verifyExpression | ( | $expression, | |
$pattern | |||
) |
Assertion: Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in
If assertion will fail the test, it will continue to run the test case (in contrast to the assertExpression()).
string | $expression | the value to return |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6994 of file SeleniumTestCaseDoc.php.
verifyHtmlSource | ( | $pattern | ) |
Assertion: Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source
If assertion will fail the test, it will continue to run the test case (in contrast to the assertHtmlSource()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7231 of file SeleniumTestCaseDoc.php.
verifyLocation | ( | $pattern | ) |
Assertion: Gets the absolute URL of the current page.
the absolute URL of the current page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertLocation()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7456 of file SeleniumTestCaseDoc.php.
verifyMouseSpeed | ( | $pattern | ) |
Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
If assertion will fail the test, it will continue to run the test case (in contrast to the assertMouseSpeed()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7682 of file SeleniumTestCaseDoc.php.
verifyNotAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAlert()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 632 of file SeleniumTestCaseDoc.php.
verifyNotAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllButtons()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1110 of file SeleniumTestCaseDoc.php.
verifyNotAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllFields()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1351 of file SeleniumTestCaseDoc.php.
verifyNotAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllLinks()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1592 of file SeleniumTestCaseDoc.php.
verifyNotAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowIds()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1822 of file SeleniumTestCaseDoc.php.
verifyNotAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowNames()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2048 of file SeleniumTestCaseDoc.php.
verifyNotAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowTitles()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2274 of file SeleniumTestCaseDoc.php.
verifyNotAttribute | ( | $attributeLocator, | |
$pattern | |||
) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAttribute()).
string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2524 of file SeleniumTestCaseDoc.php.
verifyNotAttributeFromAllWindows | ( | $attributeName, | |
$pattern | |||
) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAttributeFromAllWindows()).
string | $attributeName | name of an attribute on the windows |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2770 of file SeleniumTestCaseDoc.php.
verifyNotBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotBodyText()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2999 of file SeleniumTestCaseDoc.php.
verifyNotChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotChecked()).
string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3241 of file SeleniumTestCaseDoc.php.
verifyNotConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotConfirmation()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3543 of file SeleniumTestCaseDoc.php.
verifyNotCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCookie()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4015 of file SeleniumTestCaseDoc.php.
verifyNotCookieByName | ( | $name, | |
$pattern | |||
) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCookieByName()).
string | $name | the name of the cookie |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4251 of file SeleniumTestCaseDoc.php.
verifyNotCursorPosition | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCursorPosition()).
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4752 of file SeleniumTestCaseDoc.php.
verifyNotEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotEditable()).
string | $locator | an element locator (see Element Locators) |
Definition at line 5011 of file SeleniumTestCaseDoc.php.
verifyNotElementHeight | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the height of an element.
height of an element in pixels
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementHeight()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5253 of file SeleniumTestCaseDoc.php.
verifyNotElementIndex | ( | $locator, | |
$pattern | |||
) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementIndex()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5508 of file SeleniumTestCaseDoc.php.
verifyNotElementPositionLeft | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementPositionLeft()).
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5984 of file SeleniumTestCaseDoc.php.
verifyNotElementPositionTop | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementPositionTop()).
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6226 of file SeleniumTestCaseDoc.php.
verifyNotElementWidth | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the width of an element.
width of an element in pixels
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementWidth()).
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6468 of file SeleniumTestCaseDoc.php.
verifyNotEval | ( | $script, | |
$pattern | |||
) |
Assertion: Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotEval()).
string | $script | the JavaScript snippet to run |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6758 of file SeleniumTestCaseDoc.php.
verifyNotExpression | ( | $expression, | |
$pattern | |||
) |
Assertion: Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotExpression()).
string | $expression | the value to return |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7028 of file SeleniumTestCaseDoc.php.
verifyNotHtmlSource | ( | $pattern | ) |
Assertion: Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotHtmlSource()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7261 of file SeleniumTestCaseDoc.php.
verifyNotLocation | ( | $pattern | ) |
Assertion: Gets the absolute URL of the current page.
the absolute URL of the current page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotLocation()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7486 of file SeleniumTestCaseDoc.php.
verifyNotMouseSpeed | ( | $pattern | ) |
Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotMouseSpeed()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7712 of file SeleniumTestCaseDoc.php.
verifyNotOrdered | ( | $locator1, | |
$locator2 | |||
) |
Assertion: Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotOrdered()).
string | $locator1 | an element locator pointing to the first element (see Element Locators) |
string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 7933 of file SeleniumTestCaseDoc.php.
verifyNotPrompt | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotPrompt()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8211 of file SeleniumTestCaseDoc.php.
verifyNotSelectedId | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedId()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8715 of file SeleniumTestCaseDoc.php.
verifyNotSelectedIds | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIds()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8958 of file SeleniumTestCaseDoc.php.
verifyNotSelectedIndex | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIndex()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9201 of file SeleniumTestCaseDoc.php.
verifyNotSelectedIndexes | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIndexes()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9449 of file SeleniumTestCaseDoc.php.
verifyNotSelectedLabel | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedLabel()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9695 of file SeleniumTestCaseDoc.php.
verifyNotSelectedLabels | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedLabels()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9941 of file SeleniumTestCaseDoc.php.
verifyNotSelectedValue | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedValue()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10187 of file SeleniumTestCaseDoc.php.
verifyNotSelectedValues | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedValues()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10433 of file SeleniumTestCaseDoc.php.
verifyNotSelectOptions | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectOptions()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8472 of file SeleniumTestCaseDoc.php.
verifyNotSomethingSelected | ( | $selectLocator | ) |
Assertion: Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSomethingSelected()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10673 of file SeleniumTestCaseDoc.php.
verifyNotSpeed | ( | $pattern | ) |
Assertion: Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSpeed()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10911 of file SeleniumTestCaseDoc.php.
verifyNotTable | ( | $tableCellAddress, | |
$pattern | |||
) |
Assertion: Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotTable()).
string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11161 of file SeleniumTestCaseDoc.php.
verifyNotText | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotText()).
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11421 of file SeleniumTestCaseDoc.php.
verifyNotTitle | ( | $pattern | ) |
Assertion: Gets the title of the current page.
the title of the current page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotTitle()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11661 of file SeleniumTestCaseDoc.php.
verifyNotValue | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotValue()).
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11908 of file SeleniumTestCaseDoc.php.
verifyNotVisible | ( | $locator | ) |
Assertion: Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotVisible()).
string | $locator | an element locator (see Element Locators) |
Definition at line 12171 of file SeleniumTestCaseDoc.php.
verifyNotWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
$target | |||
) |
Assertion: 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.
true if the new frame is this code's window
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotWhetherThisFrameMatchFrameExpression()).
string | $currentFrameString | starting frame |
string | $target | new frame (which might be relative to the current one) |
Definition at line 12442 of file SeleniumTestCaseDoc.php.
verifyNotWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
$target | |||
) |
Assertion: 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.
true if the new window is this code's window
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotWhetherThisWindowMatchWindowExpression()).
string | $currentWindowString | starting window |
string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12719 of file SeleniumTestCaseDoc.php.
verifyNotXpathCount | ( | $xpath, | |
$pattern | |||
) |
Assertion: Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotXpathCount()).
string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 12976 of file SeleniumTestCaseDoc.php.
verifyOrdered | ( | $locator1, | |
$locator2 | |||
) |
Assertion: Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertOrdered()).
string | $locator1 | an element locator pointing to the first element (see Element Locators) |
string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 7967 of file SeleniumTestCaseDoc.php.
verifyPrompt | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt
If assertion will fail the test, it will continue to run the test case (in contrast to the assertPrompt()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8249 of file SeleniumTestCaseDoc.php.
verifyPromptNotPresent | ( | ) |
Assertion: Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt
If assertion will fail the test, it will continue to run the test case (in contrast to the assertPromptNotPresent()).
Definition at line 13211 of file SeleniumTestCaseDoc.php.
verifyPromptPresent | ( | ) |
Assertion: Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt
If assertion will fail the test, it will continue to run the test case (in contrast to the assertPromptPresent()).
Definition at line 13240 of file SeleniumTestCaseDoc.php.
verifySelectedId | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedId()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8747 of file SeleniumTestCaseDoc.php.
verifySelectedIds | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIds()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8990 of file SeleniumTestCaseDoc.php.
verifySelectedIndex | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIndex()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9233 of file SeleniumTestCaseDoc.php.
verifySelectedIndexes | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIndexes()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9482 of file SeleniumTestCaseDoc.php.
verifySelectedLabel | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedLabel()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9727 of file SeleniumTestCaseDoc.php.
verifySelectedLabels | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedLabels()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9974 of file SeleniumTestCaseDoc.php.
verifySelectedValue | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedValue()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10219 of file SeleniumTestCaseDoc.php.
verifySelectedValues | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedValues()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10466 of file SeleniumTestCaseDoc.php.
verifySelectOptions | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectOptions()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8504 of file SeleniumTestCaseDoc.php.
verifySomethingSelected | ( | $selectLocator | ) |
Assertion: Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSomethingSelected()).
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10703 of file SeleniumTestCaseDoc.php.
verifySpeed | ( | $pattern | ) |
Assertion: Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSpeed()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10944 of file SeleniumTestCaseDoc.php.
verifyTable | ( | $tableCellAddress, | |
$pattern | |||
) |
Assertion: Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell
If assertion will fail the test, it will continue to run the test case (in contrast to the assertTable()).
string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11194 of file SeleniumTestCaseDoc.php.
verifyText | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element
If assertion will fail the test, it will continue to run the test case (in contrast to the assertText()).
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11456 of file SeleniumTestCaseDoc.php.
verifyTextNotPresent | ( | $pattern | ) |
Assertion: Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertTextNotPresent()).
string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13439 of file SeleniumTestCaseDoc.php.
verifyTextPresent | ( | $pattern | ) |
Assertion: Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertTextPresent()).
string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13469 of file SeleniumTestCaseDoc.php.
verifyTitle | ( | $pattern | ) |
Assertion: Gets the title of the current page.
the title of the current page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertTitle()).
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11691 of file SeleniumTestCaseDoc.php.
verifyValue | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements
If assertion will fail the test, it will continue to run the test case (in contrast to the assertValue()).
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11942 of file SeleniumTestCaseDoc.php.
verifyVisible | ( | $locator | ) |
Assertion: Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertVisible()).
string | $locator | an element locator (see Element Locators) |
Definition at line 12205 of file SeleniumTestCaseDoc.php.
verifyWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
$target | |||
) |
Assertion: 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.
true if the new frame is this code's window
If assertion will fail the test, it will continue to run the test case (in contrast to the assertWhetherThisFrameMatchFrameExpression()).
string | $currentFrameString | starting frame |
string | $target | new frame (which might be relative to the current one) |
Definition at line 12478 of file SeleniumTestCaseDoc.php.
verifyWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
$target | |||
) |
Assertion: 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.
true if the new window is this code's window
If assertion will fail the test, it will continue to run the test case (in contrast to the assertWhetherThisWindowMatchWindowExpression()).
string | $currentWindowString | starting window |
string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12755 of file SeleniumTestCaseDoc.php.
verifyXpathCount | ( | $xpath, | |
$pattern | |||
) |
Assertion: Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath
If assertion will fail the test, it will continue to run the test case (in contrast to the assertXpathCount()).
string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 13009 of file SeleniumTestCaseDoc.php.
waitForAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 672 of file SeleniumTestCaseDoc.php.
waitForAlertNotPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 905 of file SeleniumTestCaseDoc.php.
waitForAlertPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 935 of file SeleniumTestCaseDoc.php.
waitForAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1143 of file SeleniumTestCaseDoc.php.
waitForAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1384 of file SeleniumTestCaseDoc.php.
waitForAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1625 of file SeleniumTestCaseDoc.php.
waitForAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1853 of file SeleniumTestCaseDoc.php.
waitForAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2079 of file SeleniumTestCaseDoc.php.
waitForAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2305 of file SeleniumTestCaseDoc.php.
waitForAttribute | ( | $attributeLocator, | |
$pattern | |||
) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2559 of file SeleniumTestCaseDoc.php.
waitForAttributeFromAllWindows | ( | $attributeName, | |
$pattern | |||
) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $attributeName | name of an attribute on the windows |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2803 of file SeleniumTestCaseDoc.php.
waitForBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3030 of file SeleniumTestCaseDoc.php.
waitForChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3274 of file SeleniumTestCaseDoc.php.
waitForCondition | ( | $script, | |
$timeout | |||
) |
Runs the specified JavaScript snippet repeatedly until it evaluates to "true".
The snippet may have multiple lines, but only the result of the last line will be considered.
Note that, by default, the snippet will be run in the runner's test window, not in the window of your application. To get the window of your application, you can use the JavaScript snippet [selenium.browserbot.getCurrentWindow()], and then run your JavaScript in there.
string | $script | the JavaScript snippet to run |
string | $timeout | a timeout in milliseconds, after which this command will return with an error |
Definition at line 16326 of file SeleniumTestCaseDoc.php.
waitForConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3586 of file SeleniumTestCaseDoc.php.
waitForConfirmationNotPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 3822 of file SeleniumTestCaseDoc.php.
waitForConfirmationPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 3852 of file SeleniumTestCaseDoc.php.
waitForCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4046 of file SeleniumTestCaseDoc.php.
waitForCookieByName | ( | $name, | |
$pattern | |||
) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $name | the name of the cookie |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4284 of file SeleniumTestCaseDoc.php.
waitForCookieNotPresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $name | the name of the cookie |
Definition at line 4510 of file SeleniumTestCaseDoc.php.
waitForCookiePresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $name | the name of the cookie |
Definition at line 4540 of file SeleniumTestCaseDoc.php.
waitForCursorPosition | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4791 of file SeleniumTestCaseDoc.php.
waitForEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
Definition at line 5044 of file SeleniumTestCaseDoc.php.
waitForElementHeight | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the height of an element.
height of an element in pixels
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5286 of file SeleniumTestCaseDoc.php.
waitForElementIndex | ( | $locator, | |
$pattern | |||
) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5543 of file SeleniumTestCaseDoc.php.
waitForElementNotPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
Definition at line 5777 of file SeleniumTestCaseDoc.php.
waitForElementPositionLeft | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6017 of file SeleniumTestCaseDoc.php.
waitForElementPositionTop | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6259 of file SeleniumTestCaseDoc.php.
waitForElementPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
Definition at line 5808 of file SeleniumTestCaseDoc.php.
waitForElementWidth | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the width of an element.
width of an element in pixels
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6501 of file SeleniumTestCaseDoc.php.
waitForEval | ( | $script, | |
$pattern | |||
) |
Assertion: Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $script | the JavaScript snippet to run |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6799 of file SeleniumTestCaseDoc.php.
waitForExpression | ( | $expression, | |
$pattern | |||
) |
Assertion: Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $expression | the value to return |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7063 of file SeleniumTestCaseDoc.php.
waitForFrameToLoad | ( | $frameAddress, | |
$timeout | |||
) |
Waits for a new frame to load.
Selenium constantly keeps track of new pages and frames loading, and sets a "newPageLoaded" flag when it first notices a page load.
See waitForPageToLoad for more information.
string | $frameAddress | FrameAddress from the server side |
string | $timeout | a timeout in milliseconds, after which this command will return with an error |
Definition at line 16342 of file SeleniumTestCaseDoc.php.
waitForHtmlSource | ( | $pattern | ) |
Assertion: Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7292 of file SeleniumTestCaseDoc.php.
waitForLocation | ( | $pattern | ) |
Assertion: Gets the absolute URL of the current page.
the absolute URL of the current page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7517 of file SeleniumTestCaseDoc.php.
waitForMouseSpeed | ( | $pattern | ) |
Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7743 of file SeleniumTestCaseDoc.php.
waitForNotAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 712 of file SeleniumTestCaseDoc.php.
waitForNotAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1176 of file SeleniumTestCaseDoc.php.
waitForNotAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1417 of file SeleniumTestCaseDoc.php.
waitForNotAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1658 of file SeleniumTestCaseDoc.php.
waitForNotAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1884 of file SeleniumTestCaseDoc.php.
waitForNotAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2110 of file SeleniumTestCaseDoc.php.
waitForNotAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2336 of file SeleniumTestCaseDoc.php.
waitForNotAttribute | ( | $attributeLocator, | |
$pattern | |||
) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2594 of file SeleniumTestCaseDoc.php.
waitForNotAttributeFromAllWindows | ( | $attributeName, | |
$pattern | |||
) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $attributeName | name of an attribute on the windows |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2836 of file SeleniumTestCaseDoc.php.
waitForNotBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3061 of file SeleniumTestCaseDoc.php.
waitForNotChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3307 of file SeleniumTestCaseDoc.php.
waitForNotConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3629 of file SeleniumTestCaseDoc.php.
waitForNotCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4077 of file SeleniumTestCaseDoc.php.
waitForNotCookieByName | ( | $name, | |
$pattern | |||
) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $name | the name of the cookie |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4317 of file SeleniumTestCaseDoc.php.
waitForNotCursorPosition | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4830 of file SeleniumTestCaseDoc.php.
waitForNotEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
Definition at line 5077 of file SeleniumTestCaseDoc.php.
waitForNotElementHeight | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the height of an element.
height of an element in pixels
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5319 of file SeleniumTestCaseDoc.php.
waitForNotElementIndex | ( | $locator, | |
$pattern | |||
) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5578 of file SeleniumTestCaseDoc.php.
waitForNotElementPositionLeft | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6050 of file SeleniumTestCaseDoc.php.
waitForNotElementPositionTop | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6292 of file SeleniumTestCaseDoc.php.
waitForNotElementWidth | ( | $locator, | |
$pattern | |||
) |
Assertion: Retrieves the width of an element.
width of an element in pixels
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator pointing to an element (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6534 of file SeleniumTestCaseDoc.php.
waitForNotEval | ( | $script, | |
$pattern | |||
) |
Assertion: Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $script | the JavaScript snippet to run |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6840 of file SeleniumTestCaseDoc.php.
waitForNotExpression | ( | $expression, | |
$pattern | |||
) |
Assertion: Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $expression | the value to return |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7098 of file SeleniumTestCaseDoc.php.
waitForNotHtmlSource | ( | $pattern | ) |
Assertion: Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7323 of file SeleniumTestCaseDoc.php.
waitForNotLocation | ( | $pattern | ) |
Assertion: Gets the absolute URL of the current page.
the absolute URL of the current page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7548 of file SeleniumTestCaseDoc.php.
waitForNotMouseSpeed | ( | $pattern | ) |
Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7774 of file SeleniumTestCaseDoc.php.
waitForNotOrdered | ( | $locator1, | |
$locator2 | |||
) |
Assertion: Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator1 | an element locator pointing to the first element (see Element Locators) |
string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 8002 of file SeleniumTestCaseDoc.php.
waitForNotPrompt | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8288 of file SeleniumTestCaseDoc.php.
waitForNotSelectedId | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8780 of file SeleniumTestCaseDoc.php.
waitForNotSelectedIds | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9023 of file SeleniumTestCaseDoc.php.
waitForNotSelectedIndex | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9266 of file SeleniumTestCaseDoc.php.
waitForNotSelectedIndexes | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9516 of file SeleniumTestCaseDoc.php.
waitForNotSelectedLabel | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9760 of file SeleniumTestCaseDoc.php.
waitForNotSelectedLabels | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10008 of file SeleniumTestCaseDoc.php.
waitForNotSelectedValue | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10252 of file SeleniumTestCaseDoc.php.
waitForNotSelectedValues | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10500 of file SeleniumTestCaseDoc.php.
waitForNotSelectOptions | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8537 of file SeleniumTestCaseDoc.php.
waitForNotSomethingSelected | ( | $selectLocator | ) |
Assertion: Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10734 of file SeleniumTestCaseDoc.php.
waitForNotSpeed | ( | $pattern | ) |
Assertion: Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10978 of file SeleniumTestCaseDoc.php.
waitForNotTable | ( | $tableCellAddress, | |
$pattern | |||
) |
Assertion: Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11228 of file SeleniumTestCaseDoc.php.
waitForNotText | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11492 of file SeleniumTestCaseDoc.php.
waitForNotTitle | ( | $pattern | ) |
Assertion: Gets the title of the current page.
the title of the current page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11722 of file SeleniumTestCaseDoc.php.
waitForNotValue | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11977 of file SeleniumTestCaseDoc.php.
waitForNotVisible | ( | $locator | ) |
Assertion: Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
Definition at line 12240 of file SeleniumTestCaseDoc.php.
waitForNotWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
$target | |||
) |
Assertion: 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.
true if the new frame is this code's window
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $currentFrameString | starting frame |
string | $target | new frame (which might be relative to the current one) |
Definition at line 12515 of file SeleniumTestCaseDoc.php.
waitForNotWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
$target | |||
) |
Assertion: 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.
true if the new window is this code's window
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $currentWindowString | starting window |
string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12792 of file SeleniumTestCaseDoc.php.
waitForNotXpathCount | ( | $xpath, | |
$pattern | |||
) |
Assertion: Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 13043 of file SeleniumTestCaseDoc.php.
waitForOrdered | ( | $locator1, | |
$locator2 | |||
) |
Assertion: Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator1 | an element locator pointing to the first element (see Element Locators) |
string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 8037 of file SeleniumTestCaseDoc.php.
waitForPageToLoad | ( | $timeout | ) |
Waits for a new page to load.
You can use this command instead of the "AndWait" suffixes, "clickAndWait", "selectAndWait", "typeAndWait" etc. (which are only available in the JS API).
Selenium constantly keeps track of new pages loading, and sets a "newPageLoaded" flag when it first notices a page load. Running any other Selenium command after turns the flag to false. Hence, if you want to wait for a page to load, you must wait immediately after a Selenium command that caused a page-load.
string | $timeout | a timeout in milliseconds, after which this command will return with an error |
Definition at line 16361 of file SeleniumTestCaseDoc.php.
waitForPopUp | ( | $windowID, | |
$timeout | |||
) |
Waits for a popup window to appear and load up.
string | $windowID | 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). |
string | $timeout | 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. |
Definition at line 16379 of file SeleniumTestCaseDoc.php.
waitForPrompt | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8327 of file SeleniumTestCaseDoc.php.
waitForPromptNotPresent | ( | ) |
Assertion: Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 13270 of file SeleniumTestCaseDoc.php.
waitForPromptPresent | ( | ) |
Assertion: Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 13300 of file SeleniumTestCaseDoc.php.
waitForSelectedId | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8813 of file SeleniumTestCaseDoc.php.
waitForSelectedIds | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9056 of file SeleniumTestCaseDoc.php.
waitForSelectedIndex | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9299 of file SeleniumTestCaseDoc.php.
waitForSelectedIndexes | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9550 of file SeleniumTestCaseDoc.php.
waitForSelectedLabel | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9793 of file SeleniumTestCaseDoc.php.
waitForSelectedLabels | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10042 of file SeleniumTestCaseDoc.php.
waitForSelectedValue | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10285 of file SeleniumTestCaseDoc.php.
waitForSelectedValues | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10534 of file SeleniumTestCaseDoc.php.
waitForSelectOptions | ( | $selectLocator, | |
$pattern | |||
) |
Assertion: Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8570 of file SeleniumTestCaseDoc.php.
waitForSomethingSelected | ( | $selectLocator | ) |
Assertion: Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10765 of file SeleniumTestCaseDoc.php.
waitForSpeed | ( | $pattern | ) |
Assertion: Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11012 of file SeleniumTestCaseDoc.php.
waitForTable | ( | $tableCellAddress, | |
$pattern | |||
) |
Assertion: Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11262 of file SeleniumTestCaseDoc.php.
waitForText | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11528 of file SeleniumTestCaseDoc.php.
waitForTextNotPresent | ( | $pattern | ) |
Assertion: Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13500 of file SeleniumTestCaseDoc.php.
waitForTextPresent | ( | $pattern | ) |
Assertion: Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13531 of file SeleniumTestCaseDoc.php.
waitForTitle | ( | $pattern | ) |
Assertion: Gets the title of the current page.
the title of the current page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11753 of file SeleniumTestCaseDoc.php.
waitForValue | ( | $locator, | |
$pattern | |||
) |
Assertion: Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 12012 of file SeleniumTestCaseDoc.php.
waitForVisible | ( | $locator | ) |
Assertion: Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $locator | an element locator (see Element Locators) |
Definition at line 12275 of file SeleniumTestCaseDoc.php.
waitForWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
$target | |||
) |
Assertion: 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.
true if the new frame is this code's window
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $currentFrameString | starting frame |
string | $target | new frame (which might be relative to the current one) |
Definition at line 12552 of file SeleniumTestCaseDoc.php.
waitForWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
$target | |||
) |
Assertion: 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.
true if the new window is this code's window
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $currentWindowString | starting window |
string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12829 of file SeleniumTestCaseDoc.php.
waitForXpathCount | ( | $xpath, | |
$pattern | |||
) |
Assertion: Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 13077 of file SeleniumTestCaseDoc.php.
windowFocus | ( | ) |
Gives focus to the currently selected window.
Definition at line 16389 of file SeleniumTestCaseDoc.php.
windowMaximize | ( | ) |
Resize currently selected window to take up the entire screen.
Definition at line 16399 of file SeleniumTestCaseDoc.php.
$doc_Element_Filters |
Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.
Filters look much like locators, ie. filterType=argument
Supported element-filters are:
Definition at line 97 of file SeleniumTestCaseDoc.php.
$doc_Element_Locators |
Element Locators tell Selenium which HTML element a command refers to. The format of a locator is: locatorType=argument
We support the following strategies for locating elements (and locator types):
Without an explicit locator prefix, Selenium uses the following default strategies:
Definition at line 82 of file SeleniumTestCaseDoc.php.
$doc_Stored_Variables |
All Selenium command parameters can be constructed using both simple variable substitution as well as full javascript. Both of these mechanisms can access previously stored variables, but do so using different syntax.
The commands store, storeValue and storeText can be used to store a variable value for later access. Internally, these variables are stored in a map called "storedVars", with values keyed by the variable name. These commands are documented in the command reference.
Variable substitution provides a simple way to include a previously stored variable in a command parameter. This is a simple mechanism, by which the variable to substitute is indicated by ${variableName}. Multiple variables can be substituted, and intermixed with static text.
$this->storeTitle('pageTitle');
$this->storeText('css=.text','elementText');
$this->store('fullPageTitle', '{$pageTitle} -- ${elementText}');
$this->type('textElement', 'Page title is: ${fullPageTitle}');
Javascript evaluation provides the full power of javascript in constructing a command parameter. To use this mechanism, the entire parameter value must be prefixed by 'javascript{' with a trailing '}'. The text inside the braces is evaluated as a javascript expression, and can access previously stored variables using the storedVars map detailed above. Note that variable substitution cannot be combined with javascript evaluation.
$this->store('javascript{'merchant' + (new Date()).getTime()}', 'merchantId');
$this->type('textElement', 'javascript{storedVars['merchantId'].toUpperCase()}');
Definition at line 161 of file SeleniumTestCaseDoc.php.
$doc_String_match_Patterns |
Various Pattern syntaxes are available for matching string values:
Definition at line 116 of file SeleniumTestCaseDoc.php.
trait SeleniumTestCaseDoc |
Class SeleniumTestCaseDoc
This class provides extended documentation (phpDoc) for phpunit-selenium methods (override documentation of methods PHPUnit_Extensions_SeleniumTestCase). Class used for easy development of tests in IDE (like phpStorm or NetBeans).
Definition at line 19 of file SeleniumTestCaseDoc.php.