PHPUnit Selenium Docs
SeleniumTestCaseDoc.php File Reference

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
 

Function Documentation

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:

  • locator: the string the user passed in
  • inWindow: the currently selected window
  • inDocument: the currently selected document

The function must return null if the element can't be found.

Parameters
string$strategyNamethe name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation.
string$functionDefinitiona string defining the body of a function in JavaScript. For example: return inDocument.getElementById(locator);
Returns
void
See also
addLocationStrategyAndWait() Related Action

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:

  • locator: the string the user passed in
  • inWindow: the currently selected window
  • inDocument: the currently selected document

The function must return null if the element can't be found.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$strategyNamethe name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation.
string$functionDefinitiona string defining the body of a function in JavaScript. For example: return inDocument.getElementById(locator);
Returns
void
See also
addLocationStrategy() Base method, from which has been generated (automatically) current method

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.

Parameters
string$scriptContentthe 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.
Returns
void
See also
addScriptAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$scriptContentthe 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.
Returns
void
See also
addScript() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator identifying a multi-select box (see Element Locators)
string$optionLocatoran option locator (a label by default)
Returns
void
See also
addSelectionAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator identifying a multi-select box (see Element Locators)
string$optionLocatoran option locator (a label by default)
Returns
void
See also
addSelection() Base method, from which has been generated (automatically) current method

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.

Parameters
string$allowboolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath
Returns
void
See also
allowNativeXpathAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$allowboolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath
Returns
void
See also
allowNativeXpath() Base method, from which has been generated (automatically) current method

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.

Returns
void
See also
altKeyDownAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
altKeyDown() Base method, from which has been generated (automatically) current method

Definition at line 374 of file SeleniumTestCaseDoc.php.

altKeyUp ( )

Release the alt key.

Returns
void
See also
altKeyUpAndWait() Related Action

Definition at line 386 of file SeleniumTestCaseDoc.php.

altKeyUpAndWait ( )

Release the alt key.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
altKeyUp() Base method, from which has been generated (automatically) current method

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()].

Parameters
string$answerthe answer to give in response to the prompt pop-up
Returns
void

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.

Value to verify:

The message of the most recent JavaScript alert

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAlert()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAlert() Base method, from which has been generated (automatically) current method
assertNotAlert() Related Assertion
getAlert() Related Accessor
verifyAlert() Related Assertion
verifyNotAlert() Related Assertion
waitForAlert() Related Assertion
waitForNotAlert() Related Assertion

Definition at line 454 of file SeleniumTestCaseDoc.php.

assertAlertNotPresent ( )

Assertion: Has an alert occurred?

This function never throws an exception .

Value to verify:

true if there is an alert

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAlertNotPresent()).

Returns
void
See also
storeAlertPresent() Base method, from which has been generated (automatically) current method
assertAlertPresent() Related Assertion
isAlertPresent() Related Accessor
verifyAlertNotPresent() Related Assertion
verifyAlertPresent() Related Assertion
waitForAlertNotPresent() Related Assertion
waitForAlertPresent() Related Assertion

Definition at line 741 of file SeleniumTestCaseDoc.php.

assertAlertPresent ( )

Assertion: Has an alert occurred?

This function never throws an exception .

Value to verify:

true if there is an alert

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAlertPresent()).

Returns
void
See also
storeAlertPresent() Base method, from which has been generated (automatically) current method
assertAlertNotPresent() Related Assertion
isAlertPresent() Related Accessor
verifyAlertNotPresent() Related Assertion
verifyAlertPresent() Related Assertion
waitForAlertNotPresent() Related Assertion
waitForAlertPresent() Related Assertion

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.

Value to verify:

the IDs of all buttons on the page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllButtons()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllButtons() Base method, from which has been generated (automatically) current method
assertNotAllButtons() Related Assertion
getAllButtons() Related Accessor
verifyAllButtons() Related Assertion
verifyNotAllButtons() Related Assertion
waitForAllButtons() Related Assertion
waitForNotAllButtons() Related Assertion

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.

Value to verify:

the IDs of all field on the page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllFields()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllFields() Base method, from which has been generated (automatically) current method
assertNotAllFields() Related Assertion
getAllFields() Related Accessor
verifyAllFields() Related Assertion
verifyNotAllFields() Related Assertion
waitForAllFields() Related Assertion
waitForNotAllFields() Related Assertion

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.

Value to verify:

the IDs of all links on the page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllLinks()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllLinks() Base method, from which has been generated (automatically) current method
assertNotAllLinks() Related Assertion
getAllLinks() Related Accessor
verifyAllLinks() Related Assertion
verifyNotAllLinks() Related Assertion
waitForAllLinks() Related Assertion
waitForNotAllLinks() Related Assertion

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.

Value to verify:

Array of identifiers of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllWindowIds()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowIds() Base method, from which has been generated (automatically) current method
assertNotAllWindowIds() Related Assertion
getAllWindowIds() Related Accessor
verifyAllWindowIds() Related Assertion
verifyNotAllWindowIds() Related Assertion
waitForAllWindowIds() Related Assertion
waitForNotAllWindowIds() Related Assertion

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.

Value to verify:

Array of names of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllWindowNames()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowNames() Base method, from which has been generated (automatically) current method
assertNotAllWindowNames() Related Assertion
getAllWindowNames() Related Accessor
verifyAllWindowNames() Related Assertion
verifyNotAllWindowNames() Related Assertion
waitForAllWindowNames() Related Assertion
waitForNotAllWindowNames() Related Assertion

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.

Value to verify:

Array of titles of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAllWindowTitles()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowTitles() Base method, from which has been generated (automatically) current method
assertNotAllWindowTitles() Related Assertion
getAllWindowTitles() Related Accessor
verifyAllWindowTitles() Related Assertion
verifyNotAllWindowTitles() Related Assertion
waitForAllWindowTitles() Related Assertion
waitForNotAllWindowTitles() Related Assertion

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

Value to verify:

the value of the specified attribute

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAttribute()).

Parameters
string$attributeLocatoran element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttribute() Base method, from which has been generated (automatically) current method
assertNotAttribute() Related Assertion
getAttribute() Related Accessor
verifyAttribute() Related Assertion
verifyNotAttribute() Related Assertion
waitForAttribute() Related Assertion
waitForNotAttribute() Related Assertion

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.

Value to verify:

the set of values of this attribute from all known windows.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyAttributeFromAllWindows()).

Parameters
string$attributeNamename of an attribute on the windows
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttributeFromAllWindows() Base method, from which has been generated (automatically) current method
assertNotAttributeFromAllWindows() Related Assertion
getAttributeFromAllWindows() Related Accessor
verifyAttributeFromAllWindows() Related Assertion
verifyNotAttributeFromAllWindows() Related Assertion
waitForAttributeFromAllWindows() Related Assertion
waitForNotAttributeFromAllWindows() Related Assertion

Definition at line 2626 of file SeleniumTestCaseDoc.php.

assertBodyText (   $pattern)

Assertion: Gets the entire text of the page.

Value to verify:

the entire text of the page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyBodyText()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeBodyText() Base method, from which has been generated (automatically) current method
assertNotBodyText() Related Assertion
getBodyText() Related Accessor
verifyBodyText() Related Assertion
verifyNotBodyText() Related Assertion
waitForBodyText() Related Assertion
waitForNotBodyText() Related Assertion

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.

Value to verify:

true if the checkbox is checked, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyChecked()).

Parameters
string$locatoran element locator pointing to a checkbox or radio button (see Element Locators)
Returns
void
See also
storeChecked() Base method, from which has been generated (automatically) current method
assertNotChecked() Related Assertion
isChecked() Related Accessor
verifyChecked() Related Assertion
verifyNotChecked() Related Assertion
waitForChecked() Related Assertion
waitForNotChecked() Related Assertion

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.

Value to verify:

the message of the most recent JavaScript confirmation dialog

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyConfirmation()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeConfirmation() Base method, from which has been generated (automatically) current method
assertNotConfirmation() Related Assertion
getConfirmation() Related Accessor
verifyConfirmation() Related Assertion
verifyNotConfirmation() Related Assertion
waitForConfirmation() Related Assertion
waitForNotConfirmation() Related Assertion

Definition at line 3349 of file SeleniumTestCaseDoc.php.

assertConfirmationNotPresent ( )

Assertion: Has confirm() been called?

This function never throws an exception .

Value to verify:

true if there is a pending confirmation

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyConfirmationNotPresent()).

Returns
void
See also
storeConfirmationPresent() Base method, from which has been generated (automatically) current method
assertConfirmationPresent() Related Assertion
isConfirmationPresent() Related Accessor
verifyConfirmationNotPresent() Related Assertion
verifyConfirmationPresent() Related Assertion
waitForConfirmationNotPresent() Related Assertion
waitForConfirmationPresent() Related Assertion

Definition at line 3658 of file SeleniumTestCaseDoc.php.

assertConfirmationPresent ( )

Assertion: Has confirm() been called?

This function never throws an exception .

Value to verify:

true if there is a pending confirmation

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyConfirmationPresent()).

Returns
void
See also
storeConfirmationPresent() Base method, from which has been generated (automatically) current method
assertConfirmationNotPresent() Related Assertion
isConfirmationPresent() Related Accessor
verifyConfirmationNotPresent() Related Assertion
verifyConfirmationPresent() Related Assertion
waitForConfirmationNotPresent() Related Assertion
waitForConfirmationPresent() Related Assertion

Definition at line 3687 of file SeleniumTestCaseDoc.php.

assertCookie (   $pattern)

Assertion: Return all cookies of the current page under test.

Value to verify:

all cookies of the current page under test

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyCookie()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookie() Base method, from which has been generated (automatically) current method
assertNotCookie() Related Assertion
getCookie() Related Accessor
verifyCookie() Related Assertion
verifyNotCookie() Related Assertion
waitForCookie() Related Assertion
waitForNotCookie() Related Assertion

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.

Value to verify:

the value of the cookie

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyCookieByName()).

Parameters
string$namethe name of the cookie
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookieByName() Base method, from which has been generated (automatically) current method
assertNotCookieByName() Related Assertion
getCookieByName() Related Accessor
verifyCookieByName() Related Assertion
verifyNotCookieByName() Related Assertion
waitForCookieByName() Related Assertion
waitForNotCookieByName() Related Assertion

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.

Value to verify:

true if a cookie with the specified name is present, or false otherwise.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyCookieNotPresent()).

Parameters
string$namethe name of the cookie
Returns
void
See also
storeCookiePresent() Base method, from which has been generated (automatically) current method
assertCookiePresent() Related Assertion
isCookiePresent() Related Accessor
verifyCookieNotPresent() Related Assertion
verifyCookiePresent() Related Assertion
waitForCookieNotPresent() Related Assertion
waitForCookiePresent() Related Assertion

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.

Value to verify:

true if a cookie with the specified name is present, or false otherwise.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyCookiePresent()).

Parameters
string$namethe name of the cookie
Returns
void
See also
storeCookiePresent() Base method, from which has been generated (automatically) current method
assertCookieNotPresent() Related Assertion
isCookiePresent() Related Accessor
verifyCookieNotPresent() Related Assertion
verifyCookiePresent() Related Assertion
waitForCookieNotPresent() Related Assertion
waitForCookiePresent() Related Assertion

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.

Value to verify:

the numerical position of the cursor in the field

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyCursorPosition()).

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCursorPosition() Base method, from which has been generated (automatically) current method
assertNotCursorPosition() Related Assertion
getCursorPosition() Related Accessor
verifyCursorPosition() Related Assertion
verifyNotCursorPosition() Related Assertion
waitForCursorPosition() Related Assertion
waitForNotCursorPosition() Related Assertion

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.

Value to verify:

true if the input element is editable, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyEditable()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeEditable() Base method, from which has been generated (automatically) current method
assertNotEditable() Related Assertion
isEditable() Related Accessor
verifyEditable() Related Assertion
verifyNotEditable() Related Assertion
waitForEditable() Related Assertion
waitForNotEditable() Related Assertion

Definition at line 4862 of file SeleniumTestCaseDoc.php.

assertElementHeight (   $locator,
  $pattern 
)

Assertion: Retrieves the height of an element.

Value to verify:

height of an element in pixels

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementHeight()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementHeight() Base method, from which has been generated (automatically) current method
assertNotElementHeight() Related Assertion
getElementHeight() Related Accessor
verifyElementHeight() Related Assertion
verifyNotElementHeight() Related Assertion
waitForElementHeight() Related Assertion
waitForNotElementHeight() Related Assertion

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.

Value to verify:

of relative index of the element to its parent (starting from 0)

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementIndex()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementIndex() Base method, from which has been generated (automatically) current method
assertNotElementIndex() Related Assertion
getElementIndex() Related Accessor
verifyElementIndex() Related Assertion
verifyNotElementIndex() Related Assertion
waitForElementIndex() Related Assertion
waitForNotElementIndex() Related Assertion

Definition at line 5353 of file SeleniumTestCaseDoc.php.

assertElementNotPresent (   $locator)

Assertion: Verifies that the specified element is somewhere on the page.

Value to verify:

true if the element is present, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementNotPresent()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeElementPresent() Base method, from which has been generated (automatically) current method
assertElementPresent() Related Assertion
isElementPresent() Related Accessor
verifyElementNotPresent() Related Assertion
verifyElementPresent() Related Assertion
waitForElementNotPresent() Related Assertion
waitForElementPresent() Related Assertion

Definition at line 5608 of file SeleniumTestCaseDoc.php.

assertElementPositionLeft (   $locator,
  $pattern 
)

Assertion: Retrieves the horizontal position of an element.

Value to verify:

of pixels from the edge of the frame.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementPositionLeft()).

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionLeft() Base method, from which has been generated (automatically) current method
assertNotElementPositionLeft() Related Assertion
getElementPositionLeft() Related Accessor
verifyElementPositionLeft() Related Assertion
verifyNotElementPositionLeft() Related Assertion
waitForElementPositionLeft() Related Assertion
waitForNotElementPositionLeft() Related Assertion

Definition at line 5840 of file SeleniumTestCaseDoc.php.

assertElementPositionTop (   $locator,
  $pattern 
)

Assertion: Retrieves the vertical position of an element.

Value to verify:

of pixels from the edge of the frame.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementPositionTop()).

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionTop() Base method, from which has been generated (automatically) current method
assertNotElementPositionTop() Related Assertion
getElementPositionTop() Related Accessor
verifyElementPositionTop() Related Assertion
verifyNotElementPositionTop() Related Assertion
waitForElementPositionTop() Related Assertion
waitForNotElementPositionTop() Related Assertion

Definition at line 6082 of file SeleniumTestCaseDoc.php.

assertElementPresent (   $locator)

Assertion: Verifies that the specified element is somewhere on the page.

Value to verify:

true if the element is present, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementPresent()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeElementPresent() Base method, from which has been generated (automatically) current method
assertElementNotPresent() Related Assertion
isElementPresent() Related Accessor
verifyElementNotPresent() Related Assertion
verifyElementPresent() Related Assertion
waitForElementNotPresent() Related Assertion
waitForElementPresent() Related Assertion

Definition at line 5638 of file SeleniumTestCaseDoc.php.

assertElementWidth (   $locator,
  $pattern 
)

Assertion: Retrieves the width of an element.

Value to verify:

width of an element in pixels

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyElementWidth()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementWidth() Base method, from which has been generated (automatically) current method
assertNotElementWidth() Related Assertion
getElementWidth() Related Accessor
verifyElementWidth() Related Assertion
verifyNotElementWidth() Related Assertion
waitForElementWidth() Related Assertion
waitForNotElementWidth() Related Assertion

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.

Value to verify:

the results of evaluating the snippet

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyEval()).

Parameters
string$scriptthe JavaScript snippet to run
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeEval() Base method, from which has been generated (automatically) current method
assertNotEval() Related Assertion
getEval() Related Accessor
verifyEval() Related Assertion
verifyNotEval() Related Assertion
waitForEval() Related Assertion
waitForNotEval() Related Assertion

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.

Value to verify:

the value passed in

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyExpression()).

Parameters
string$expressionthe value to return
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeExpression() Base method, from which has been generated (automatically) current method
assertNotExpression() Related Assertion
getExpression() Related Accessor
verifyExpression() Related Assertion
verifyNotExpression() Related Assertion
waitForExpression() Related Assertion
waitForNotExpression() Related Assertion

Definition at line 6874 of file SeleniumTestCaseDoc.php.

assertHtmlSource (   $pattern)

Assertion: Returns the entire HTML source between the opening and closing "html" tags.

Value to verify:

the entire HTML source

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyHtmlSource()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeHtmlSource() Base method, from which has been generated (automatically) current method
assertNotHtmlSource() Related Assertion
getHtmlSource() Related Accessor
verifyHtmlSource() Related Assertion
verifyNotHtmlSource() Related Assertion
waitForHtmlSource() Related Assertion
waitForNotHtmlSource() Related Assertion

Definition at line 7128 of file SeleniumTestCaseDoc.php.

assertLocation (   $pattern)

Assertion: Gets the absolute URL of the current page.

Value to verify:

the absolute URL of the current page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyLocation()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeLocation() Base method, from which has been generated (automatically) current method
assertNotLocation() Related Assertion
getLocation() Related Accessor
verifyLocation() Related Assertion
verifyNotLocation() Related Assertion
waitForLocation() Related Assertion
waitForNotLocation() Related Assertion

Definition at line 7353 of file SeleniumTestCaseDoc.php.

assertMouseSpeed (   $pattern)

Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Value to verify:

the number of pixels between "mousemove" events during dragAndDrop commands (default=10)

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyMouseSpeed()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeMouseSpeed() Base method, from which has been generated (automatically) current method
assertNotMouseSpeed() Related Assertion
getMouseSpeed() Related Accessor
verifyMouseSpeed() Related Assertion
verifyNotMouseSpeed() Related Assertion
waitForMouseSpeed() Related Assertion
waitForNotMouseSpeed() Related Assertion

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.

Value to verify:

The message of the most recent JavaScript alert

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAlert()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAlert() Base method, from which has been generated (automatically) current method
assertAlert() Related Assertion
getAlert() Related Accessor
verifyAlert() Related Assertion
verifyNotAlert() Related Assertion
waitForAlert() Related Assertion
waitForNotAlert() Related Assertion

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.

Value to verify:

the IDs of all buttons on the page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllButtons()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllButtons() Base method, from which has been generated (automatically) current method
assertAllButtons() Related Assertion
getAllButtons() Related Accessor
verifyAllButtons() Related Assertion
verifyNotAllButtons() Related Assertion
waitForAllButtons() Related Assertion
waitForNotAllButtons() Related Assertion

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.

Value to verify:

the IDs of all field on the page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllFields()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllFields() Base method, from which has been generated (automatically) current method
assertAllFields() Related Assertion
getAllFields() Related Accessor
verifyAllFields() Related Assertion
verifyNotAllFields() Related Assertion
waitForAllFields() Related Assertion
waitForNotAllFields() Related Assertion

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.

Value to verify:

the IDs of all links on the page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllLinks()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllLinks() Base method, from which has been generated (automatically) current method
assertAllLinks() Related Assertion
getAllLinks() Related Accessor
verifyAllLinks() Related Assertion
verifyNotAllLinks() Related Assertion
waitForAllLinks() Related Assertion
waitForNotAllLinks() Related Assertion

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.

Value to verify:

Array of identifiers of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllWindowIds()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowIds() Base method, from which has been generated (automatically) current method
assertAllWindowIds() Related Assertion
getAllWindowIds() Related Accessor
verifyAllWindowIds() Related Assertion
verifyNotAllWindowIds() Related Assertion
waitForAllWindowIds() Related Assertion
waitForNotAllWindowIds() Related Assertion

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.

Value to verify:

Array of names of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllWindowNames()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowNames() Base method, from which has been generated (automatically) current method
assertAllWindowNames() Related Assertion
getAllWindowNames() Related Accessor
verifyAllWindowNames() Related Assertion
verifyNotAllWindowNames() Related Assertion
waitForAllWindowNames() Related Assertion
waitForNotAllWindowNames() Related Assertion

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.

Value to verify:

Array of titles of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAllWindowTitles()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowTitles() Base method, from which has been generated (automatically) current method
assertAllWindowTitles() Related Assertion
getAllWindowTitles() Related Accessor
verifyAllWindowTitles() Related Assertion
verifyNotAllWindowTitles() Related Assertion
waitForAllWindowTitles() Related Assertion
waitForNotAllWindowTitles() Related Assertion

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

Value to verify:

the value of the specified attribute

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAttribute()).

Parameters
string$attributeLocatoran element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttribute() Base method, from which has been generated (automatically) current method
assertAttribute() Related Assertion
getAttribute() Related Accessor
verifyAttribute() Related Assertion
verifyNotAttribute() Related Assertion
waitForAttribute() Related Assertion
waitForNotAttribute() Related Assertion

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.

Value to verify:

the set of values of this attribute from all known windows.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotAttributeFromAllWindows()).

Parameters
string$attributeNamename of an attribute on the windows
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttributeFromAllWindows() Base method, from which has been generated (automatically) current method
assertAttributeFromAllWindows() Related Assertion
getAttributeFromAllWindows() Related Accessor
verifyAttributeFromAllWindows() Related Assertion
verifyNotAttributeFromAllWindows() Related Assertion
waitForAttributeFromAllWindows() Related Assertion
waitForNotAttributeFromAllWindows() Related Assertion

Definition at line 2658 of file SeleniumTestCaseDoc.php.

assertNotBodyText (   $pattern)

Assertion: Gets the entire text of the page.

Value to verify:

the entire text of the page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotBodyText()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeBodyText() Base method, from which has been generated (automatically) current method
assertBodyText() Related Assertion
getBodyText() Related Accessor
verifyBodyText() Related Assertion
verifyNotBodyText() Related Assertion
waitForBodyText() Related Assertion
waitForNotBodyText() Related Assertion

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.

Value to verify:

true if the checkbox is checked, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotChecked()).

Parameters
string$locatoran element locator pointing to a checkbox or radio button (see Element Locators)
Returns
void
See also
storeChecked() Base method, from which has been generated (automatically) current method
assertChecked() Related Assertion
isChecked() Related Accessor
verifyChecked() Related Assertion
verifyNotChecked() Related Assertion
waitForChecked() Related Assertion
waitForNotChecked() Related Assertion

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.

Value to verify:

the message of the most recent JavaScript confirmation dialog

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotConfirmation()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeConfirmation() Base method, from which has been generated (automatically) current method
assertConfirmation() Related Assertion
getConfirmation() Related Accessor
verifyConfirmation() Related Assertion
verifyNotConfirmation() Related Assertion
waitForConfirmation() Related Assertion
waitForNotConfirmation() Related Assertion

Definition at line 3391 of file SeleniumTestCaseDoc.php.

assertNotCookie (   $pattern)

Assertion: Return all cookies of the current page under test.

Value to verify:

all cookies of the current page under test

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotCookie()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookie() Base method, from which has been generated (automatically) current method
assertCookie() Related Assertion
getCookie() Related Accessor
verifyCookie() Related Assertion
verifyNotCookie() Related Assertion
waitForCookie() Related Assertion
waitForNotCookie() Related Assertion

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.

Value to verify:

the value of the cookie

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotCookieByName()).

Parameters
string$namethe name of the cookie
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookieByName() Base method, from which has been generated (automatically) current method
assertCookieByName() Related Assertion
getCookieByName() Related Accessor
verifyCookieByName() Related Assertion
verifyNotCookieByName() Related Assertion
waitForCookieByName() Related Assertion
waitForNotCookieByName() Related Assertion

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.

Value to verify:

the numerical position of the cursor in the field

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotCursorPosition()).

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCursorPosition() Base method, from which has been generated (automatically) current method
assertCursorPosition() Related Assertion
getCursorPosition() Related Accessor
verifyCursorPosition() Related Assertion
verifyNotCursorPosition() Related Assertion
waitForCursorPosition() Related Assertion
waitForNotCursorPosition() Related Assertion

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.

Value to verify:

true if the input element is editable, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotEditable()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeEditable() Base method, from which has been generated (automatically) current method
assertEditable() Related Assertion
isEditable() Related Accessor
verifyEditable() Related Assertion
verifyNotEditable() Related Assertion
waitForEditable() Related Assertion
waitForNotEditable() Related Assertion

Definition at line 4894 of file SeleniumTestCaseDoc.php.

assertNotElementHeight (   $locator,
  $pattern 
)

Assertion: Retrieves the height of an element.

Value to verify:

height of an element in pixels

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementHeight()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementHeight() Base method, from which has been generated (automatically) current method
assertElementHeight() Related Assertion
getElementHeight() Related Accessor
verifyElementHeight() Related Assertion
verifyNotElementHeight() Related Assertion
waitForElementHeight() Related Assertion
waitForNotElementHeight() Related Assertion

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.

Value to verify:

of relative index of the element to its parent (starting from 0)

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementIndex()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementIndex() Base method, from which has been generated (automatically) current method
assertElementIndex() Related Assertion
getElementIndex() Related Accessor
verifyElementIndex() Related Assertion
verifyNotElementIndex() Related Assertion
waitForElementIndex() Related Assertion
waitForNotElementIndex() Related Assertion

Definition at line 5387 of file SeleniumTestCaseDoc.php.

assertNotElementPositionLeft (   $locator,
  $pattern 
)

Assertion: Retrieves the horizontal position of an element.

Value to verify:

of pixels from the edge of the frame.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementPositionLeft()).

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionLeft() Base method, from which has been generated (automatically) current method
assertElementPositionLeft() Related Assertion
getElementPositionLeft() Related Accessor
verifyElementPositionLeft() Related Assertion
verifyNotElementPositionLeft() Related Assertion
waitForElementPositionLeft() Related Assertion
waitForNotElementPositionLeft() Related Assertion

Definition at line 5872 of file SeleniumTestCaseDoc.php.

assertNotElementPositionTop (   $locator,
  $pattern 
)

Assertion: Retrieves the vertical position of an element.

Value to verify:

of pixels from the edge of the frame.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementPositionTop()).

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionTop() Base method, from which has been generated (automatically) current method
assertElementPositionTop() Related Assertion
getElementPositionTop() Related Accessor
verifyElementPositionTop() Related Assertion
verifyNotElementPositionTop() Related Assertion
waitForElementPositionTop() Related Assertion
waitForNotElementPositionTop() Related Assertion

Definition at line 6114 of file SeleniumTestCaseDoc.php.

assertNotElementWidth (   $locator,
  $pattern 
)

Assertion: Retrieves the width of an element.

Value to verify:

width of an element in pixels

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotElementWidth()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementWidth() Base method, from which has been generated (automatically) current method
assertElementWidth() Related Assertion
getElementWidth() Related Accessor
verifyElementWidth() Related Assertion
verifyNotElementWidth() Related Assertion
waitForElementWidth() Related Assertion
waitForNotElementWidth() Related Assertion

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.

Value to verify:

the results of evaluating the snippet

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotEval()).

Parameters
string$scriptthe JavaScript snippet to run
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeEval() Base method, from which has been generated (automatically) current method
assertEval() Related Assertion
getEval() Related Accessor
verifyEval() Related Assertion
verifyNotEval() Related Assertion
waitForEval() Related Assertion
waitForNotEval() Related Assertion

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.

Value to verify:

the value passed in

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotExpression()).

Parameters
string$expressionthe value to return
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeExpression() Base method, from which has been generated (automatically) current method
assertExpression() Related Assertion
getExpression() Related Accessor
verifyExpression() Related Assertion
verifyNotExpression() Related Assertion
waitForExpression() Related Assertion
waitForNotExpression() Related Assertion

Definition at line 6908 of file SeleniumTestCaseDoc.php.

assertNotHtmlSource (   $pattern)

Assertion: Returns the entire HTML source between the opening and closing "html" tags.

Value to verify:

the entire HTML source

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotHtmlSource()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeHtmlSource() Base method, from which has been generated (automatically) current method
assertHtmlSource() Related Assertion
getHtmlSource() Related Accessor
verifyHtmlSource() Related Assertion
verifyNotHtmlSource() Related Assertion
waitForHtmlSource() Related Assertion
waitForNotHtmlSource() Related Assertion

Definition at line 7158 of file SeleniumTestCaseDoc.php.

assertNotLocation (   $pattern)

Assertion: Gets the absolute URL of the current page.

Value to verify:

the absolute URL of the current page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotLocation()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeLocation() Base method, from which has been generated (automatically) current method
assertLocation() Related Assertion
getLocation() Related Accessor
verifyLocation() Related Assertion
verifyNotLocation() Related Assertion
waitForLocation() Related Assertion
waitForNotLocation() Related Assertion

Definition at line 7383 of file SeleniumTestCaseDoc.php.

assertNotMouseSpeed (   $pattern)

Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Value to verify:

the number of pixels between "mousemove" events during dragAndDrop commands (default=10)

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotMouseSpeed()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeMouseSpeed() Base method, from which has been generated (automatically) current method
assertMouseSpeed() Related Assertion
getMouseSpeed() Related Accessor
verifyMouseSpeed() Related Assertion
verifyNotMouseSpeed() Related Assertion
waitForMouseSpeed() Related Assertion
waitForNotMouseSpeed() Related Assertion

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.

Value to verify:

true if element1 is the previous sibling of element2, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotOrdered()).

Parameters
string$locator1an element locator pointing to the first element (see Element Locators)
string$locator2an element locator pointing to the second element (see Element Locators)
Returns
void
See also
storeOrdered() Base method, from which has been generated (automatically) current method
assertOrdered() Related Assertion
isOrdered() Related Accessor
verifyNotOrdered() Related Assertion
verifyOrdered() Related Assertion
waitForNotOrdered() Related Assertion
waitForOrdered() Related Assertion

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.

Value to verify:

the message of the most recent JavaScript question prompt

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotPrompt()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storePrompt() Base method, from which has been generated (automatically) current method
assertPrompt() Related Assertion
getPrompt() Related Accessor
verifyNotPrompt() Related Assertion
verifyPrompt() Related Assertion
waitForNotPrompt() Related Assertion
waitForPrompt() Related Assertion

Definition at line 8075 of file SeleniumTestCaseDoc.php.

assertNotSelectedId (   $selectLocator,
  $pattern 
)

Assertion: Gets option element ID for selected option in the specified select element.

Value to verify:

the selected option ID in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedId()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedId() Base method, from which has been generated (automatically) current method
assertSelectedId() Related Assertion
getSelectedId() Related Accessor
verifyNotSelectedId() Related Assertion
verifySelectedId() Related Assertion
waitForNotSelectedId() Related Assertion
waitForSelectedId() Related Assertion

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.

Value to verify:

an array of all selected option IDs in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedIds()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIds() Base method, from which has been generated (automatically) current method
assertSelectedIds() Related Assertion
getSelectedIds() Related Accessor
verifyNotSelectedIds() Related Assertion
verifySelectedIds() Related Assertion
waitForNotSelectedIds() Related Assertion
waitForSelectedIds() Related Assertion

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.

Value to verify:

the selected option index in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedIndex()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndex() Base method, from which has been generated (automatically) current method
assertSelectedIndex() Related Assertion
getSelectedIndex() Related Accessor
verifyNotSelectedIndex() Related Assertion
verifySelectedIndex() Related Assertion
waitForNotSelectedIndex() Related Assertion
waitForSelectedIndex() Related Assertion

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.

Value to verify:

an array of all selected option indexes in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedIndexes()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndexes() Base method, from which has been generated (automatically) current method
assertSelectedIndexes() Related Assertion
getSelectedIndexes() Related Accessor
verifyNotSelectedIndexes() Related Assertion
verifySelectedIndexes() Related Assertion
waitForNotSelectedIndexes() Related Assertion
waitForSelectedIndexes() Related Assertion

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.

Value to verify:

the selected option label in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedLabel()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabel() Base method, from which has been generated (automatically) current method
assertSelectedLabel() Related Assertion
getSelectedLabel() Related Accessor
verifyNotSelectedLabel() Related Assertion
verifySelectedLabel() Related Assertion
waitForNotSelectedLabel() Related Assertion
waitForSelectedLabel() Related Assertion

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.

Value to verify:

an array of all selected option labels in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedLabels()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabels() Base method, from which has been generated (automatically) current method
assertSelectedLabels() Related Assertion
getSelectedLabels() Related Accessor
verifyNotSelectedLabels() Related Assertion
verifySelectedLabels() Related Assertion
waitForNotSelectedLabels() Related Assertion
waitForSelectedLabels() Related Assertion

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.

Value to verify:

the selected option value in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedValue()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValue() Base method, from which has been generated (automatically) current method
assertSelectedValue() Related Assertion
getSelectedValue() Related Accessor
verifyNotSelectedValue() Related Assertion
verifySelectedValue() Related Assertion
waitForNotSelectedValue() Related Assertion
waitForSelectedValue() Related Assertion

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.

Value to verify:

an array of all selected option values in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectedValues()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValues() Base method, from which has been generated (automatically) current method
assertSelectedValues() Related Assertion
getSelectedValues() Related Accessor
verifyNotSelectedValues() Related Assertion
verifySelectedValues() Related Assertion
waitForNotSelectedValues() Related Assertion
waitForSelectedValues() Related Assertion

Definition at line 10318 of file SeleniumTestCaseDoc.php.

assertNotSelectOptions (   $selectLocator,
  $pattern 
)

Assertion: Gets all option labels in the specified select drop-down.

Value to verify:

an array of all option labels in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSelectOptions()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectOptions() Base method, from which has been generated (automatically) current method
assertSelectOptions() Related Assertion
getSelectOptions() Related Accessor
verifyNotSelectOptions() Related Assertion
verifySelectOptions() Related Assertion
waitForNotSelectOptions() Related Assertion
waitForSelectOptions() Related Assertion

Definition at line 8359 of file SeleniumTestCaseDoc.php.

assertNotSomethingSelected (   $selectLocator)

Assertion: Determines whether some option in a drop-down menu is selected.

Value to verify:

true if some option has been selected, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSomethingSelected()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
void
See also
storeSomethingSelected() Base method, from which has been generated (automatically) current method
assertSomethingSelected() Related Assertion
isSomethingSelected() Related Accessor
verifyNotSomethingSelected() Related Assertion
verifySomethingSelected() Related Assertion
waitForNotSomethingSelected() Related Assertion
waitForSomethingSelected() Related Assertion

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.

Value to verify:

the execution speed in milliseconds.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotSpeed()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSpeed() Base method, from which has been generated (automatically) current method
assertSpeed() Related Assertion
getSpeed() Related Accessor
verifyNotSpeed() Related Assertion
verifySpeed() Related Assertion
waitForNotSpeed() Related Assertion
waitForSpeed() Related Assertion

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.

Value to verify:

the text from the specified cell

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotTable()).

Parameters
string$tableCellAddressa cell address, e.g. "foo.1.4"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTable() Base method, from which has been generated (automatically) current method
assertTable() Related Assertion
getTable() Related Accessor
verifyNotTable() Related Assertion
verifyTable() Related Assertion
waitForNotTable() Related Assertion
waitForTable() Related Assertion

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.

Value to verify:

the text of the element

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotText()).

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeText() Base method, from which has been generated (automatically) current method
assertText() Related Assertion
getText() Related Accessor
verifyNotText() Related Assertion
verifyText() Related Assertion
waitForNotText() Related Assertion
waitForText() Related Assertion

Definition at line 11297 of file SeleniumTestCaseDoc.php.

assertNotTitle (   $pattern)

Assertion: Gets the title of the current page.

Value to verify:

the title of the current page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotTitle()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTitle() Base method, from which has been generated (automatically) current method
assertTitle() Related Assertion
getTitle() Related Accessor
verifyNotTitle() Related Assertion
verifyTitle() Related Assertion
waitForNotTitle() Related Assertion
waitForTitle() Related Assertion

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.

Value to verify:

the element value, or "on/off" for checkbox/radio elements

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotValue()).

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeValue() Base method, from which has been generated (automatically) current method
assertValue() Related Assertion
getValue() Related Accessor
verifyNotValue() Related Assertion
verifyValue() Related Assertion
waitForNotValue() Related Assertion
waitForValue() Related Assertion

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.

Value to verify:

true if the specified element is visible, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotVisible()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeVisible() Base method, from which has been generated (automatically) current method
assertVisible() Related Assertion
isVisible() Related Accessor
verifyNotVisible() Related Assertion
verifyVisible() Related Assertion
waitForNotVisible() Related Assertion
waitForVisible() Related Assertion

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.

Value to verify:

true if the new frame is this code's window

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotWhetherThisFrameMatchFrameExpression()).

Parameters
string$currentFrameStringstarting frame
string$targetnew frame (which might be relative to the current one)
Returns
void
See also
storeWhetherThisFrameMatchFrameExpression() Base method, from which has been generated (automatically) current method
assertWhetherThisFrameMatchFrameExpression() Related Assertion
getWhetherThisFrameMatchFrameExpression() Related Accessor
verifyNotWhetherThisFrameMatchFrameExpression() Related Assertion
verifyWhetherThisFrameMatchFrameExpression() Related Assertion
waitForNotWhetherThisFrameMatchFrameExpression() Related Assertion
waitForWhetherThisFrameMatchFrameExpression() Related Assertion

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.

Value to verify:

true if the new window is this code's window

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotWhetherThisWindowMatchWindowExpression()).

Parameters
string$currentWindowStringstarting window
string$targetnew window (which might be relative to the current one, e.g., "_parent")
Returns
void
See also
storeWhetherThisWindowMatchWindowExpression() Base method, from which has been generated (automatically) current method
assertWhetherThisWindowMatchWindowExpression() Related Assertion
getWhetherThisWindowMatchWindowExpression() Related Accessor
verifyNotWhetherThisWindowMatchWindowExpression() Related Assertion
verifyWhetherThisWindowMatchWindowExpression() Related Assertion
waitForNotWhetherThisWindowMatchWindowExpression() Related Assertion
waitForWhetherThisWindowMatchWindowExpression() Related Assertion

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.

Value to verify:

the number of nodes that match the specified xpath

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyNotXpathCount()).

Parameters
string$xpaththe xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeXpathCount() Base method, from which has been generated (automatically) current method
assertXpathCount() Related Assertion
getXpathCount() Related Accessor
verifyNotXpathCount() Related Assertion
verifyXpathCount() Related Assertion
waitForNotXpathCount() Related Assertion
waitForXpathCount() Related Assertion

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.

Value to verify:

true if element1 is the previous sibling of element2, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyOrdered()).

Parameters
string$locator1an element locator pointing to the first element (see Element Locators)
string$locator2an element locator pointing to the second element (see Element Locators)
Returns
void
See also
storeOrdered() Base method, from which has been generated (automatically) current method
assertNotOrdered() Related Assertion
isOrdered() Related Accessor
verifyNotOrdered() Related Assertion
verifyOrdered() Related Assertion
waitForNotOrdered() Related Assertion
waitForOrdered() Related Assertion

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.

Value to verify:

the message of the most recent JavaScript question prompt

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyPrompt()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storePrompt() Base method, from which has been generated (automatically) current method
assertNotPrompt() Related Assertion
getPrompt() Related Accessor
verifyNotPrompt() Related Assertion
verifyPrompt() Related Assertion
waitForNotPrompt() Related Assertion
waitForPrompt() Related Assertion

Definition at line 8113 of file SeleniumTestCaseDoc.php.

assertPromptNotPresent ( )

Assertion: Has a prompt occurred?

This function never throws an exception .

Value to verify:

true if there is a pending prompt

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyPromptNotPresent()).

Returns
void
See also
storePromptPresent() Base method, from which has been generated (automatically) current method
assertPromptPresent() Related Assertion
isPromptPresent() Related Accessor
verifyPromptNotPresent() Related Assertion
verifyPromptPresent() Related Assertion
waitForPromptNotPresent() Related Assertion
waitForPromptPresent() Related Assertion

Definition at line 13106 of file SeleniumTestCaseDoc.php.

assertPromptPresent ( )

Assertion: Has a prompt occurred?

This function never throws an exception .

Value to verify:

true if there is a pending prompt

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyPromptPresent()).

Returns
void
See also
storePromptPresent() Base method, from which has been generated (automatically) current method
assertPromptNotPresent() Related Assertion
isPromptPresent() Related Accessor
verifyPromptNotPresent() Related Assertion
verifyPromptPresent() Related Assertion
waitForPromptNotPresent() Related Assertion
waitForPromptPresent() Related Assertion

Definition at line 13135 of file SeleniumTestCaseDoc.php.

assertSelectedId (   $selectLocator,
  $pattern 
)

Assertion: Gets option element ID for selected option in the specified select element.

Value to verify:

the selected option ID in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedId()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedId() Base method, from which has been generated (automatically) current method
assertNotSelectedId() Related Assertion
getSelectedId() Related Accessor
verifyNotSelectedId() Related Assertion
verifySelectedId() Related Assertion
waitForNotSelectedId() Related Assertion
waitForSelectedId() Related Assertion

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.

Value to verify:

an array of all selected option IDs in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedIds()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIds() Base method, from which has been generated (automatically) current method
assertNotSelectedIds() Related Assertion
getSelectedIds() Related Accessor
verifyNotSelectedIds() Related Assertion
verifySelectedIds() Related Assertion
waitForNotSelectedIds() Related Assertion
waitForSelectedIds() Related Assertion

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.

Value to verify:

the selected option index in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedIndex()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndex() Base method, from which has been generated (automatically) current method
assertNotSelectedIndex() Related Assertion
getSelectedIndex() Related Accessor
verifyNotSelectedIndex() Related Assertion
verifySelectedIndex() Related Assertion
waitForNotSelectedIndex() Related Assertion
waitForSelectedIndex() Related Assertion

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.

Value to verify:

an array of all selected option indexes in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedIndexes()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndexes() Base method, from which has been generated (automatically) current method
assertNotSelectedIndexes() Related Assertion
getSelectedIndexes() Related Accessor
verifyNotSelectedIndexes() Related Assertion
verifySelectedIndexes() Related Assertion
waitForNotSelectedIndexes() Related Assertion
waitForSelectedIndexes() Related Assertion

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.

Value to verify:

the selected option label in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedLabel()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabel() Base method, from which has been generated (automatically) current method
assertNotSelectedLabel() Related Assertion
getSelectedLabel() Related Accessor
verifyNotSelectedLabel() Related Assertion
verifySelectedLabel() Related Assertion
waitForNotSelectedLabel() Related Assertion
waitForSelectedLabel() Related Assertion

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.

Value to verify:

an array of all selected option labels in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedLabels()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabels() Base method, from which has been generated (automatically) current method
assertNotSelectedLabels() Related Assertion
getSelectedLabels() Related Accessor
verifyNotSelectedLabels() Related Assertion
verifySelectedLabels() Related Assertion
waitForNotSelectedLabels() Related Assertion
waitForSelectedLabels() Related Assertion

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.

Value to verify:

the selected option value in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedValue()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValue() Base method, from which has been generated (automatically) current method
assertNotSelectedValue() Related Assertion
getSelectedValue() Related Accessor
verifyNotSelectedValue() Related Assertion
verifySelectedValue() Related Assertion
waitForNotSelectedValue() Related Assertion
waitForSelectedValue() Related Assertion

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.

Value to verify:

an array of all selected option values in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectedValues()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValues() Base method, from which has been generated (automatically) current method
assertNotSelectedValues() Related Assertion
getSelectedValues() Related Accessor
verifyNotSelectedValues() Related Assertion
verifySelectedValues() Related Assertion
waitForNotSelectedValues() Related Assertion
waitForSelectedValues() Related Assertion

Definition at line 10351 of file SeleniumTestCaseDoc.php.

assertSelectOptions (   $selectLocator,
  $pattern 
)

Assertion: Gets all option labels in the specified select drop-down.

Value to verify:

an array of all option labels in the specified select drop-down

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySelectOptions()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectOptions() Base method, from which has been generated (automatically) current method
assertNotSelectOptions() Related Assertion
getSelectOptions() Related Accessor
verifyNotSelectOptions() Related Assertion
verifySelectOptions() Related Assertion
waitForNotSelectOptions() Related Assertion
waitForSelectOptions() Related Assertion

Definition at line 8391 of file SeleniumTestCaseDoc.php.

assertSomethingSelected (   $selectLocator)

Assertion: Determines whether some option in a drop-down menu is selected.

Value to verify:

true if some option has been selected, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySomethingSelected()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
void
See also
storeSomethingSelected() Base method, from which has been generated (automatically) current method
assertNotSomethingSelected() Related Assertion
isSomethingSelected() Related Accessor
verifyNotSomethingSelected() Related Assertion
verifySomethingSelected() Related Assertion
waitForNotSomethingSelected() Related Assertion
waitForSomethingSelected() Related Assertion

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.

Value to verify:

the execution speed in milliseconds.

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifySpeed()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSpeed() Base method, from which has been generated (automatically) current method
assertNotSpeed() Related Assertion
getSpeed() Related Accessor
verifyNotSpeed() Related Assertion
verifySpeed() Related Assertion
waitForNotSpeed() Related Assertion
waitForSpeed() Related Assertion

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.

Value to verify:

the text from the specified cell

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyTable()).

Parameters
string$tableCellAddressa cell address, e.g. "foo.1.4"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTable() Base method, from which has been generated (automatically) current method
assertNotTable() Related Assertion
getTable() Related Accessor
verifyNotTable() Related Assertion
verifyTable() Related Assertion
waitForNotTable() Related Assertion
waitForTable() Related Assertion

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.

Value to verify:

the text of the element

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyText()).

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeText() Base method, from which has been generated (automatically) current method
assertNotText() Related Assertion
getText() Related Accessor
verifyNotText() Related Assertion
verifyText() Related Assertion
waitForNotText() Related Assertion
waitForText() Related Assertion

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.

Value to verify:

true if the pattern matches the text, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyTextNotPresent()).

Parameters
string$patterna pattern to match with the text of the page (see String match Patterns)
Returns
void
See also
storeTextPresent() Base method, from which has been generated (automatically) current method
assertTextPresent() Related Assertion
isTextPresent() Related Accessor
verifyTextNotPresent() Related Assertion
verifyTextPresent() Related Assertion
waitForTextNotPresent() Related Assertion
waitForTextPresent() Related Assertion

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.

Value to verify:

true if the pattern matches the text, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyTextPresent()).

Parameters
string$patterna pattern to match with the text of the page (see String match Patterns)
Returns
void
See also
storeTextPresent() Base method, from which has been generated (automatically) current method
assertTextNotPresent() Related Assertion
isTextPresent() Related Accessor
verifyTextNotPresent() Related Assertion
verifyTextPresent() Related Assertion
waitForTextNotPresent() Related Assertion
waitForTextPresent() Related Assertion

Definition at line 13360 of file SeleniumTestCaseDoc.php.

assertTitle (   $pattern)

Assertion: Gets the title of the current page.

Value to verify:

the title of the current page

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyTitle()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTitle() Base method, from which has been generated (automatically) current method
assertNotTitle() Related Assertion
getTitle() Related Accessor
verifyNotTitle() Related Assertion
verifyTitle() Related Assertion
waitForNotTitle() Related Assertion
waitForTitle() Related Assertion

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.

Value to verify:

the element value, or "on/off" for checkbox/radio elements

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyValue()).

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeValue() Base method, from which has been generated (automatically) current method
assertNotValue() Related Assertion
getValue() Related Accessor
verifyNotValue() Related Assertion
verifyValue() Related Assertion
waitForNotValue() Related Assertion
waitForValue() Related Assertion

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.

Value to verify:

true if the specified element is visible, false otherwise

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyVisible()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeVisible() Base method, from which has been generated (automatically) current method
assertNotVisible() Related Assertion
isVisible() Related Accessor
verifyNotVisible() Related Assertion
verifyVisible() Related Assertion
waitForNotVisible() Related Assertion
waitForVisible() Related Assertion

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.

Value to verify:

true if the new frame is this code's window

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyWhetherThisFrameMatchFrameExpression()).

Parameters
string$currentFrameStringstarting frame
string$targetnew frame (which might be relative to the current one)
Returns
void
See also
storeWhetherThisFrameMatchFrameExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisFrameMatchFrameExpression() Related Assertion
getWhetherThisFrameMatchFrameExpression() Related Accessor
verifyNotWhetherThisFrameMatchFrameExpression() Related Assertion
verifyWhetherThisFrameMatchFrameExpression() Related Assertion
waitForNotWhetherThisFrameMatchFrameExpression() Related Assertion
waitForWhetherThisFrameMatchFrameExpression() Related Assertion

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.

Value to verify:

true if the new window is this code's window

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyWhetherThisWindowMatchWindowExpression()).

Parameters
string$currentWindowStringstarting window
string$targetnew window (which might be relative to the current one, e.g., "_parent")
Returns
void
See also
storeWhetherThisWindowMatchWindowExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisWindowMatchWindowExpression() Related Assertion
getWhetherThisWindowMatchWindowExpression() Related Accessor
verifyNotWhetherThisWindowMatchWindowExpression() Related Assertion
verifyWhetherThisWindowMatchWindowExpression() Related Assertion
waitForNotWhetherThisWindowMatchWindowExpression() Related Assertion
waitForWhetherThisWindowMatchWindowExpression() Related Assertion

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.

Value to verify:

the number of nodes that match the specified xpath

Notes:

If assertion will fail the test, it will abort the current test case (in contrast to the verifyXpathCount()).

Parameters
string$xpaththe xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeXpathCount() Base method, from which has been generated (automatically) current method
assertNotXpathCount() Related Assertion
getXpathCount() Related Accessor
verifyNotXpathCount() Related Assertion
verifyXpathCount() Related Assertion
waitForNotXpathCount() Related Assertion
waitForXpathCount() Related Assertion

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.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$identifiera string to be used as the ID of the specified element
Returns
void
See also
assignIdAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$identifiera string to be used as the ID of the specified element
Returns
void
See also
assignId() Base method, from which has been generated (automatically) current method

Definition at line 13573 of file SeleniumTestCaseDoc.php.

attachFile (   $fieldLocator,
  $fileLocator 
)

Sets a file input (upload) field to the file listed in fileLocator.

Parameters
string$fieldLocatoran element locator (see Element Locators)
string$fileLocatora 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.
Returns
void

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.

Parameters
string$filenamethe 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$kwargsa kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options:
background
the background CSS for the HTML document. 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).
Returns
void
See also
captureEntirePageScreenshotAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$filenamethe 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$kwargsa kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options:
background
the background CSS for the HTML document. 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).
Returns
void
See also
captureEntirePageScreenshot() Base method, from which has been generated (automatically) current method

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.

Parameters
string$kwargsA 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).
Returns
string The base 64 encoded string of the page screenshot (PNG file)
See also
captureEntirePageScreenshotToStringAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$kwargsA 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).
Returns
string The base 64 encoded string of the page screenshot (PNG file)
See also
captureEntirePageScreenshotToString() Base method, from which has been generated (automatically) current method

Definition at line 13700 of file SeleniumTestCaseDoc.php.

captureScreenshot (   $filename)

Captures a PNG screenshot to the specified file.

Parameters
string$filenamethe absolute path to the file to be written, e.g. "c:\blah\screenshot.png"
Returns
void
See also
captureScreenshotAndWait() Related Action

Definition at line 13714 of file SeleniumTestCaseDoc.php.

captureScreenshotAndWait (   $filename)

Captures a PNG screenshot to the specified file.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$filenamethe absolute path to the file to be written, e.g. "c:\blah\screenshot.png"
Returns
void
See also
captureScreenshot() Base method, from which has been generated (automatically) current method

Definition at line 13732 of file SeleniumTestCaseDoc.php.

captureScreenshotToString ( )

Capture a PNG screenshot.

It then returns the file as a base 64 encoded string.

Returns
string The base 64 encoded string of the screen shot (PNG file)
See also
captureScreenshotToStringAndWait() Related Action

Definition at line 13746 of file SeleniumTestCaseDoc.php.

captureScreenshotToStringAndWait ( )

Capture a PNG screenshot.

It then returns the file as a base 64 encoded string.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
string The base 64 encoded string of the screen shot (PNG file)
See also
captureScreenshotToString() Base method, from which has been generated (automatically) current method

Definition at line 13764 of file SeleniumTestCaseDoc.php.

check (   $locator)

Check a toggle-button (checkbox/radio).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
checkAndWait() Related Action

Definition at line 13779 of file SeleniumTestCaseDoc.php.

checkAndWait (   $locator)

Check a toggle-button (checkbox/radio).

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
check() Base method, from which has been generated (automatically) current method

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.

Returns
void
See also
chooseCancelOnNextConfirmationAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
chooseCancelOnNextConfirmation() Base method, from which has been generated (automatically) current method

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.

Returns
void
See also
chooseOkOnNextConfirmationAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
chooseOkOnNextConfirmation() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator
Returns
void
See also
clickAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator
Returns
void
See also
click() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
clickAtAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
clickAt() Base method, from which has been generated (automatically) current method

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.

Returns
void

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

Parameters
string$locatoran element locator
Returns
void
See also
contextMenuAndWait() Related Action

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

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator
Returns
void
See also
contextMenu() Base method, from which has been generated (automatically) current method

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

Parameters
string$locatoran element locator
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
contextMenuAtAndWait() Related Action

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

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
contextMenuAt() Base method, from which has been generated (automatically) current method

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.

Returns
void
See also
controlKeyDownAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
controlKeyDown() Base method, from which has been generated (automatically) current method

Definition at line 14075 of file SeleniumTestCaseDoc.php.

controlKeyUp ( )

Release the control key.

Returns
void
See also
controlKeyUpAndWait() Related Action

Definition at line 14087 of file SeleniumTestCaseDoc.php.

controlKeyUpAndWait ( )

Release the control key.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
controlKeyUp() Base method, from which has been generated (automatically) current method

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.

Parameters
string$nameValuePairname and value of the cookie in a format "name=value"
string$optionsStringoptions 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.
Returns
void
See also
createCookieAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$nameValuePairname and value of the cookie in a format "name=value"
string$optionsStringoptions 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.
Returns
void
See also
createCookie() Base method, from which has been generated (automatically) current method

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.

Returns
void
See also
deleteAllVisibleCookiesAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
deleteAllVisibleCookies() Base method, from which has been generated (automatically) current method

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.

Parameters
string$namethe name of the cookie to be deleted
string$optionsStringoptions 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.
Returns
void
See also
deleteCookieAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$namethe name of the cookie to be deleted
string$optionsStringoptions 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.
Returns
void
See also
deleteCookie() Base method, from which has been generated (automatically) current method

Definition at line 14237 of file SeleniumTestCaseDoc.php.

deselectPopUp ( )

Selects the main window.

Functionally equivalent to using [selectWindow()] and specifying no value for [windowID].

Returns
void
See also
deselectPopUpAndWait() Related Action

Definition at line 14251 of file SeleniumTestCaseDoc.php.

deselectPopUpAndWait ( )

Selects the main window.

Functionally equivalent to using [selectWindow()] and specifying no value for [windowID].

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
deselectPopUp() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator
Returns
void
See also
doubleClickAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator
Returns
void
See also
doubleClick() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
doubleClickAtAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
doubleClickAt() Base method, from which has been generated (automatically) current method

Definition at line 14345 of file SeleniumTestCaseDoc.php.

dragAndDrop (   $locator,
  $movementsString 
)

Drags an element a certain distance and then drops it.

Parameters
string$locatoran element locator
string$movementsStringoffset in pixels from the current location to which the element should be moved, e.g., "+70,-300"
Returns
void
See also
dragAndDropAndWait() Related Action

Definition at line 14361 of file SeleniumTestCaseDoc.php.

dragAndDropAndWait (   $locator,
  $movementsString 
)

Drags an element a certain distance and then drops it.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator
string$movementsStringoffset in pixels from the current location to which the element should be moved, e.g., "+70,-300"
Returns
void
See also
dragAndDrop() Base method, from which has been generated (automatically) current method

Definition at line 14381 of file SeleniumTestCaseDoc.php.

dragAndDropToObject (   $locatorOfObjectToBeDragged,
  $locatorOfDragDestinationObject 
)

Drags an element and drops it on another element.

Parameters
string$locatorOfObjectToBeDraggedan element to be dragged
string$locatorOfDragDestinationObjectan element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped
Returns
void
See also
dragAndDropToObjectAndWait() Related Action

Definition at line 14397 of file SeleniumTestCaseDoc.php.

dragAndDropToObjectAndWait (   $locatorOfObjectToBeDragged,
  $locatorOfDragDestinationObject 
)

Drags an element and drops it on another element.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatorOfObjectToBeDraggedan element to be dragged
string$locatorOfDragDestinationObjectan element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped
Returns
void
See also
dragAndDropToObject() Base method, from which has been generated (automatically) current method

Definition at line 14417 of file SeleniumTestCaseDoc.php.

dragDrop (   $locator,
  $movementsString 
)

deprecated - use dragAndDrop instead.

Parameters
string$locatoran element locator
string$movementsStringoffset in pixels from the current location to which the element should be moved, e.g., "+70,-300"
Returns
void
See also
dragdrop() Base method, from which has been generated (automatically) current method
dragDropAndWait() Related Action

Definition at line 14434 of file SeleniumTestCaseDoc.php.

dragDropAndWait (   $locator,
  $movementsString 
)

deprecated - use dragAndDrop instead.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator
string$movementsStringoffset in pixels from the current location to which the element should be moved, e.g., "+70,-300"
Returns
void
See also
dragdrop() Base method, from which has been generated (automatically) current method
dragDrop() Related Action

Definition at line 14455 of file SeleniumTestCaseDoc.php.

fireEvent (   $locator,
  $eventName 
)

Explicitly simulate an event, to trigger the corresponding "on<em>event</em>" handler.

Parameters
string$locatoran element locator (see Element Locators)
string$eventNamethe event name, e.g. "focus" or "blur"
Returns
void
See also
fireEventAndWait() Related Action

Definition at line 14471 of file SeleniumTestCaseDoc.php.

fireEventAndWait (   $locator,
  $eventName 
)

Explicitly simulate an event, to trigger the corresponding "on<em>event</em>" handler.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$eventNamethe event name, e.g. "focus" or "blur"
Returns
void
See also
fireEvent() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
focusAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
focus() Base method, from which has been generated (automatically) current method

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.

Returns
string The message of the most recent JavaScript alert
See also
storeAlert() Base method, from which has been generated (automatically) current method
assertAlert() Related Assertion
assertNotAlert() Related Assertion
verifyAlert() Related Assertion
verifyNotAlert() Related Assertion
waitForAlert() Related Assertion
waitForNotAlert() Related Assertion

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.

Returns
string[] the IDs of all buttons on the page
See also
storeAllButtons() Base method, from which has been generated (automatically) current method
assertAllButtons() Related Assertion
assertNotAllButtons() Related Assertion
verifyAllButtons() Related Assertion
verifyNotAllButtons() Related Assertion
waitForAllButtons() Related Assertion
waitForNotAllButtons() Related Assertion

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.

Returns
string[] the IDs of all field on the page
See also
storeAllFields() Base method, from which has been generated (automatically) current method
assertAllFields() Related Assertion
assertNotAllFields() Related Assertion
verifyAllFields() Related Assertion
verifyNotAllFields() Related Assertion
waitForAllFields() Related Assertion
waitForNotAllFields() Related Assertion

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.

Returns
string[] the IDs of all links on the page
See also
storeAllLinks() Base method, from which has been generated (automatically) current method
assertAllLinks() Related Assertion
assertNotAllLinks() Related Assertion
verifyAllLinks() Related Assertion
verifyNotAllLinks() Related Assertion
waitForAllLinks() Related Assertion
waitForNotAllLinks() Related Assertion

Definition at line 1501 of file SeleniumTestCaseDoc.php.

getAllWindowIds ( )

Returns the IDs of all windows that the browser knows about in an array.

Returns
string[] Array of identifiers of all windows that the browser knows about.
See also
storeAllWindowIds() Base method, from which has been generated (automatically) current method
assertAllWindowIds() Related Assertion
assertNotAllWindowIds() Related Assertion
verifyAllWindowIds() Related Assertion
verifyNotAllWindowIds() Related Assertion
waitForAllWindowIds() Related Assertion
waitForNotAllWindowIds() Related Assertion

Definition at line 1736 of file SeleniumTestCaseDoc.php.

getAllWindowNames ( )

Returns the names of all windows that the browser knows about in an array.

Returns
string[] Array of names of all windows that the browser knows about.
See also
storeAllWindowNames() Base method, from which has been generated (automatically) current method
assertAllWindowNames() Related Assertion
assertNotAllWindowNames() Related Assertion
verifyAllWindowNames() Related Assertion
verifyNotAllWindowNames() Related Assertion
waitForAllWindowNames() Related Assertion
waitForNotAllWindowNames() Related Assertion

Definition at line 1962 of file SeleniumTestCaseDoc.php.

getAllWindowTitles ( )

Returns the titles of all windows that the browser knows about in an array.

Returns
string[] Array of titles of all windows that the browser knows about.
See also
storeAllWindowTitles() Base method, from which has been generated (automatically) current method
assertAllWindowTitles() Related Assertion
assertNotAllWindowTitles() Related Assertion
verifyAllWindowTitles() Related Assertion
verifyNotAllWindowTitles() Related Assertion
waitForAllWindowTitles() Related Assertion
waitForNotAllWindowTitles() Related Assertion

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

Parameters
string$attributeLocatoran element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
Returns
string the value of the specified attribute
See also
storeAttribute() Base method, from which has been generated (automatically) current method
assertAttribute() Related Assertion
assertNotAttribute() Related Assertion
verifyAttribute() Related Assertion
verifyNotAttribute() Related Assertion
waitForAttribute() Related Assertion
waitForNotAttribute() Related Assertion

Definition at line 2427 of file SeleniumTestCaseDoc.php.

getAttributeFromAllWindows (   $attributeName)

Returns an array of JavaScript property values from all known windows having one.

Parameters
string$attributeNamename of an attribute on the windows
Returns
string[] the set of values of this attribute from all known windows.
See also
storeAttributeFromAllWindows() Base method, from which has been generated (automatically) current method
assertAttributeFromAllWindows() Related Assertion
assertNotAttributeFromAllWindows() Related Assertion
verifyAttributeFromAllWindows() Related Assertion
verifyNotAttributeFromAllWindows() Related Assertion
waitForAttributeFromAllWindows() Related Assertion
waitForNotAttributeFromAllWindows() Related Assertion

Definition at line 2679 of file SeleniumTestCaseDoc.php.

getBodyText ( )

Gets the entire text of the page.

Returns
string the entire text of the page
See also
storeBodyText() Base method, from which has been generated (automatically) current method
assertBodyText() Related Assertion
assertNotBodyText() Related Assertion
verifyBodyText() Related Assertion
verifyNotBodyText() Related Assertion
waitForBodyText() Related Assertion
waitForNotBodyText() Related Assertion

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.

Returns
string the message of the most recent JavaScript confirmation dialog
See also
storeConfirmation() Base method, from which has been generated (automatically) current method
assertConfirmation() Related Assertion
assertNotConfirmation() Related Assertion
verifyConfirmation() Related Assertion
verifyNotConfirmation() Related Assertion
waitForConfirmation() Related Assertion
waitForNotConfirmation() Related Assertion

Definition at line 3421 of file SeleniumTestCaseDoc.php.

getCookie ( )

Return all cookies of the current page under test.

Returns
string all cookies of the current page under test
See also
storeCookie() Base method, from which has been generated (automatically) current method
assertCookie() Related Assertion
assertNotCookie() Related Assertion
verifyCookie() Related Assertion
verifyNotCookie() Related Assertion
waitForCookie() Related Assertion
waitForNotCookie() Related Assertion

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.

Parameters
string$namethe name of the cookie
Returns
string the value of the cookie
See also
storeCookieByName() Base method, from which has been generated (automatically) current method
assertCookieByName() Related Assertion
assertNotCookieByName() Related Assertion
verifyCookieByName() Related Assertion
verifyNotCookieByName() Related Assertion
waitForCookieByName() Related Assertion
waitForNotCookieByName() Related Assertion

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.

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
Returns
int the numerical position of the cursor in the field
See also
storeCursorPosition() Base method, from which has been generated (automatically) current method
assertCursorPosition() Related Assertion
assertNotCursorPosition() Related Assertion
verifyCursorPosition() Related Assertion
verifyNotCursorPosition() Related Assertion
waitForCursorPosition() Related Assertion
waitForNotCursorPosition() Related Assertion

Definition at line 4643 of file SeleniumTestCaseDoc.php.

getElementHeight (   $locator)

Retrieves the height of an element.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
Returns
int height of an element in pixels
See also
storeElementHeight() Base method, from which has been generated (automatically) current method
assertElementHeight() Related Assertion
assertNotElementHeight() Related Assertion
verifyElementHeight() Related Assertion
verifyNotElementHeight() Related Assertion
waitForElementHeight() Related Assertion
waitForNotElementHeight() Related Assertion

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.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
Returns
int of relative index of the element to its parent (starting from 0)
See also
storeElementIndex() Base method, from which has been generated (automatically) current method
assertElementIndex() Related Assertion
assertNotElementIndex() Related Assertion
verifyElementIndex() Related Assertion
verifyNotElementIndex() Related Assertion
waitForElementIndex() Related Assertion
waitForNotElementIndex() Related Assertion

Definition at line 5410 of file SeleniumTestCaseDoc.php.

getElementPositionLeft (   $locator)

Retrieves the horizontal position of an element.

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
Returns
int of pixels from the edge of the frame.
See also
storeElementPositionLeft() Base method, from which has been generated (automatically) current method
assertElementPositionLeft() Related Assertion
assertNotElementPositionLeft() Related Assertion
verifyElementPositionLeft() Related Assertion
verifyNotElementPositionLeft() Related Assertion
waitForElementPositionLeft() Related Assertion
waitForNotElementPositionLeft() Related Assertion

Definition at line 5893 of file SeleniumTestCaseDoc.php.

getElementPositionTop (   $locator)

Retrieves the vertical position of an element.

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
Returns
int of pixels from the edge of the frame.
See also
storeElementPositionTop() Base method, from which has been generated (automatically) current method
assertElementPositionTop() Related Assertion
assertNotElementPositionTop() Related Assertion
verifyElementPositionTop() Related Assertion
verifyNotElementPositionTop() Related Assertion
waitForElementPositionTop() Related Assertion
waitForNotElementPositionTop() Related Assertion

Definition at line 6135 of file SeleniumTestCaseDoc.php.

getElementWidth (   $locator)

Retrieves the width of an element.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
Returns
int width of an element in pixels
See also
storeElementWidth() Base method, from which has been generated (automatically) current method
assertElementWidth() Related Assertion
assertNotElementWidth() Related Assertion
verifyElementWidth() Related Assertion
verifyNotElementWidth() Related Assertion
waitForElementWidth() Related Assertion
waitForNotElementWidth() Related Assertion

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.

Parameters
string$scriptthe JavaScript snippet to run
Returns
string the results of evaluating the snippet
See also
storeEval() Base method, from which has been generated (automatically) current method
assertEval() Related Assertion
assertNotEval() Related Assertion
verifyEval() Related Assertion
verifyNotEval() Related Assertion
waitForEval() Related Assertion
waitForNotEval() Related Assertion

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.

Parameters
string$expressionthe value to return
Returns
string the value passed in
See also
storeExpression() Base method, from which has been generated (automatically) current method
assertExpression() Related Assertion
assertNotExpression() Related Assertion
verifyExpression() Related Assertion
verifyNotExpression() Related Assertion
waitForExpression() Related Assertion
waitForNotExpression() Related Assertion

Definition at line 6931 of file SeleniumTestCaseDoc.php.

getHtmlSource ( )

Returns the entire HTML source between the opening and closing "html" tags.

Returns
string the entire HTML source
See also
storeHtmlSource() Base method, from which has been generated (automatically) current method
assertHtmlSource() Related Assertion
assertNotHtmlSource() Related Assertion
verifyHtmlSource() Related Assertion
verifyNotHtmlSource() Related Assertion
waitForHtmlSource() Related Assertion
waitForNotHtmlSource() Related Assertion

Definition at line 7176 of file SeleniumTestCaseDoc.php.

getLocation ( )

Gets the absolute URL of the current page.

Returns
string the absolute URL of the current page
See also
storeLocation() Base method, from which has been generated (automatically) current method
assertLocation() Related Assertion
assertNotLocation() Related Assertion
verifyLocation() Related Assertion
verifyNotLocation() Related Assertion
waitForLocation() Related Assertion
waitForNotLocation() Related Assertion

Definition at line 7401 of file SeleniumTestCaseDoc.php.

getMouseSpeed ( )

Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Returns
int the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
See also
storeMouseSpeed() Base method, from which has been generated (automatically) current method
assertMouseSpeed() Related Assertion
assertNotMouseSpeed() Related Assertion
verifyMouseSpeed() Related Assertion
verifyNotMouseSpeed() Related Assertion
waitForMouseSpeed() Related Assertion
waitForNotMouseSpeed() Related Assertion

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.

Returns
string the message of the most recent JavaScript question prompt
See also
storePrompt() Base method, from which has been generated (automatically) current method
assertNotPrompt() Related Assertion
assertPrompt() Related Assertion
verifyNotPrompt() Related Assertion
verifyPrompt() Related Assertion
waitForNotPrompt() Related Assertion
waitForPrompt() Related Assertion

Definition at line 8139 of file SeleniumTestCaseDoc.php.

getSelectedId (   $selectLocator)

Gets option element ID for selected option in the specified select element.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string the selected option ID in the specified select drop-down
See also
storeSelectedId() Base method, from which has been generated (automatically) current method
assertNotSelectedId() Related Assertion
assertSelectedId() Related Assertion
verifyNotSelectedId() Related Assertion
verifySelectedId() Related Assertion
waitForNotSelectedId() Related Assertion
waitForSelectedId() Related Assertion

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string[] an array of all selected option IDs in the specified select drop-down
See also
storeSelectedIds() Base method, from which has been generated (automatically) current method
assertNotSelectedIds() Related Assertion
assertSelectedIds() Related Assertion
verifyNotSelectedIds() Related Assertion
verifySelectedIds() Related Assertion
waitForNotSelectedIds() Related Assertion
waitForSelectedIds() Related Assertion

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string the selected option index in the specified select drop-down
See also
storeSelectedIndex() Base method, from which has been generated (automatically) current method
assertNotSelectedIndex() Related Assertion
assertSelectedIndex() Related Assertion
verifyNotSelectedIndex() Related Assertion
verifySelectedIndex() Related Assertion
waitForNotSelectedIndex() Related Assertion
waitForSelectedIndex() Related Assertion

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string[] an array of all selected option indexes in the specified select drop-down
See also
storeSelectedIndexes() Base method, from which has been generated (automatically) current method
assertNotSelectedIndexes() Related Assertion
assertSelectedIndexes() Related Assertion
verifyNotSelectedIndexes() Related Assertion
verifySelectedIndexes() Related Assertion
waitForNotSelectedIndexes() Related Assertion
waitForSelectedIndexes() Related Assertion

Definition at line 9387 of file SeleniumTestCaseDoc.php.

getSelectedLabel (   $selectLocator)

Gets option label (visible text) for selected option in the specified select element.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string the selected option label in the specified select drop-down
See also
storeSelectedLabel() Base method, from which has been generated (automatically) current method
assertNotSelectedLabel() Related Assertion
assertSelectedLabel() Related Assertion
verifyNotSelectedLabel() Related Assertion
verifySelectedLabel() Related Assertion
waitForNotSelectedLabel() Related Assertion
waitForSelectedLabel() Related Assertion

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string[] an array of all selected option labels in the specified select drop-down
See also
storeSelectedLabels() Base method, from which has been generated (automatically) current method
assertNotSelectedLabels() Related Assertion
assertSelectedLabels() Related Assertion
verifyNotSelectedLabels() Related Assertion
verifySelectedLabels() Related Assertion
waitForNotSelectedLabels() Related Assertion
waitForSelectedLabels() Related Assertion

Definition at line 9880 of file SeleniumTestCaseDoc.php.

getSelectedValue (   $selectLocator)

Gets option value (value attribute) for selected option in the specified select element.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string the selected option value in the specified select drop-down
See also
storeSelectedValue() Base method, from which has been generated (automatically) current method
assertNotSelectedValue() Related Assertion
assertSelectedValue() Related Assertion
verifyNotSelectedValue() Related Assertion
verifySelectedValue() Related Assertion
waitForNotSelectedValue() Related Assertion
waitForSelectedValue() Related Assertion

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string[] an array of all selected option values in the specified select drop-down
See also
storeSelectedValues() Base method, from which has been generated (automatically) current method
assertNotSelectedValues() Related Assertion
assertSelectedValues() Related Assertion
verifyNotSelectedValues() Related Assertion
verifySelectedValues() Related Assertion
waitForNotSelectedValues() Related Assertion
waitForSelectedValues() Related Assertion

Definition at line 10372 of file SeleniumTestCaseDoc.php.

getSelectOptions (   $selectLocator)

Gets all option labels in the specified select drop-down.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
string[] an array of all option labels in the specified select drop-down
See also
storeSelectOptions() Base method, from which has been generated (automatically) current method
assertNotSelectOptions() Related Assertion
assertSelectOptions() Related Assertion
verifyNotSelectOptions() Related Assertion
verifySelectOptions() Related Assertion
waitForNotSelectOptions() Related Assertion
waitForSelectOptions() Related Assertion

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.

Returns
void the execution speed in milliseconds.
See also
storeSpeed() Base method, from which has been generated (automatically) current method
assertNotSpeed() Related Assertion
assertSpeed() Related Assertion
verifyNotSpeed() Related Assertion
verifySpeed() Related Assertion
waitForNotSpeed() Related Assertion
waitForSpeed() Related Assertion

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.

Parameters
string$tableCellAddressa cell address, e.g. "foo.1.4"
Returns
string the text from the specified cell
See also
storeTable() Base method, from which has been generated (automatically) current method
assertNotTable() Related Assertion
assertTable() Related Assertion
verifyNotTable() Related Assertion
verifyTable() Related Assertion
waitForNotTable() Related Assertion
waitForTable() Related Assertion

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
string the text of the element
See also
storeText() Base method, from which has been generated (automatically) current method
assertNotText() Related Assertion
assertText() Related Assertion
verifyNotText() Related Assertion
verifyText() Related Assertion
waitForNotText() Related Assertion
waitForText() Related Assertion

Definition at line 11356 of file SeleniumTestCaseDoc.php.

getTitle ( )

Gets the title of the current page.

Returns
string the title of the current page
See also
storeTitle() Base method, from which has been generated (automatically) current method
assertNotTitle() Related Assertion
assertTitle() Related Assertion
verifyNotTitle() Related Assertion
verifyTitle() Related Assertion
waitForNotTitle() Related Assertion
waitForTitle() Related Assertion

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
string the element value, or "on/off" for checkbox/radio elements
See also
storeValue() Base method, from which has been generated (automatically) current method
assertNotValue() Related Assertion
assertValue() Related Assertion
verifyNotValue() Related Assertion
verifyValue() Related Assertion
waitForNotValue() Related Assertion
waitForValue() Related Assertion

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.

Parameters
string$currentFrameStringstarting frame
string$targetnew frame (which might be relative to the current one)
Returns
bool true if the new frame is this code's window
See also
storeWhetherThisFrameMatchFrameExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisFrameMatchFrameExpression() Related Assertion
assertWhetherThisFrameMatchFrameExpression() Related Assertion
verifyNotWhetherThisFrameMatchFrameExpression() Related Assertion
verifyWhetherThisFrameMatchFrameExpression() Related Assertion
waitForNotWhetherThisFrameMatchFrameExpression() Related Assertion
waitForWhetherThisFrameMatchFrameExpression() Related Assertion

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.

Parameters
string$currentWindowStringstarting window
string$targetnew window (which might be relative to the current one, e.g., "_parent")
Returns
bool true if the new window is this code's window
See also
storeWhetherThisWindowMatchWindowExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisWindowMatchWindowExpression() Related Assertion
assertWhetherThisWindowMatchWindowExpression() Related Assertion
verifyNotWhetherThisWindowMatchWindowExpression() Related Assertion
verifyWhetherThisWindowMatchWindowExpression() Related Assertion
waitForNotWhetherThisWindowMatchWindowExpression() Related Assertion
waitForWhetherThisWindowMatchWindowExpression() Related Assertion

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.

Parameters
string$xpaththe xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
Returns
int the number of nodes that match the specified xpath
See also
storeXpathCount() Base method, from which has been generated (automatically) current method
assertNotXpathCount() Related Assertion
assertXpathCount() Related Assertion
verifyNotXpathCount() Related Assertion
verifyXpathCount() Related Assertion
waitForNotXpathCount() Related Assertion
waitForXpathCount() Related Assertion

Definition at line 12916 of file SeleniumTestCaseDoc.php.

goBack ( )

Simulates the user clicking the "back" button on their browser.

Returns
void
See also
goBackAndWait() Related Action

Definition at line 14539 of file SeleniumTestCaseDoc.php.

goBackAndWait ( )

Simulates the user clicking the "back" button on their browser.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
goBack() Base method, from which has been generated (automatically) current method

Definition at line 14555 of file SeleniumTestCaseDoc.php.

highlight (   $locator)

Briefly changes the backgroundColor of the specified element yellow.

Useful for debugging.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
highlightAndWait() Related Action

Definition at line 14572 of file SeleniumTestCaseDoc.php.

highlightAndWait (   $locator)

Briefly changes the backgroundColor of the specified element yellow.

Useful for debugging.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
highlight() Base method, from which has been generated (automatically) current method

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").

Parameters
string$ignoreboolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness.
Returns
void
See also
ignoreAttributesWithoutValueAndWait() Related Action

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").

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$ignoreboolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness.
Returns
void
See also
ignoreAttributesWithoutValue() Base method, from which has been generated (automatically) current method

Definition at line 14639 of file SeleniumTestCaseDoc.php.

isAlertPresent ( )

Has an alert occurred?

This function never throws an exception .

Returns
bool true if there is an alert
See also
storeAlertPresent() Base method, from which has been generated (automatically) current method
assertAlertNotPresent() Related Assertion
assertAlertPresent() Related Assertion
verifyAlertNotPresent() Related Assertion
verifyAlertPresent() Related Assertion
waitForAlertNotPresent() Related Assertion
waitForAlertPresent() Related Assertion

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.

Parameters
string$locatoran element locator pointing to a checkbox or radio button (see Element Locators)
Returns
bool true if the checkbox is checked, false otherwise
See also
storeChecked() Base method, from which has been generated (automatically) current method
assertChecked() Related Assertion
assertNotChecked() Related Assertion
verifyChecked() Related Assertion
verifyNotChecked() Related Assertion
waitForChecked() Related Assertion
waitForNotChecked() Related Assertion

Definition at line 3148 of file SeleniumTestCaseDoc.php.

isConfirmationPresent ( )

Has confirm() been called?

This function never throws an exception .

Returns
bool true if there is a pending confirmation
See also
storeConfirmationPresent() Base method, from which has been generated (automatically) current method
assertConfirmationNotPresent() Related Assertion
assertConfirmationPresent() Related Assertion
verifyConfirmationNotPresent() Related Assertion
verifyConfirmationPresent() Related Assertion
waitForConfirmationNotPresent() Related Assertion
waitForConfirmationPresent() Related Assertion

Definition at line 3707 of file SeleniumTestCaseDoc.php.

isCookiePresent (   $name)

Returns true if a cookie with the specified name is present, or false otherwise.

Parameters
string$namethe name of the cookie
Returns
bool true if a cookie with the specified name is present, or false otherwise.
See also
storeCookiePresent() Base method, from which has been generated (automatically) current method
assertCookieNotPresent() Related Assertion
assertCookiePresent() Related Assertion
verifyCookieNotPresent() Related Assertion
verifyCookiePresent() Related Assertion
waitForCookieNotPresent() Related Assertion
waitForCookiePresent() Related Assertion

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
bool true if the input element is editable, false otherwise
See also
storeEditable() Base method, from which has been generated (automatically) current method
assertEditable() Related Assertion
assertNotEditable() Related Assertion
verifyEditable() Related Assertion
verifyNotEditable() Related Assertion
waitForEditable() Related Assertion
waitForNotEditable() Related Assertion

Definition at line 4917 of file SeleniumTestCaseDoc.php.

isElementPresent (   $locator)

Verifies that the specified element is somewhere on the page.

Parameters
string$locatoran element locator (see Element Locators)
Returns
bool true if the element is present, false otherwise
See also
storeElementPresent() Base method, from which has been generated (automatically) current method
assertElementNotPresent() Related Assertion
assertElementPresent() Related Assertion
verifyElementNotPresent() Related Assertion
verifyElementPresent() Related Assertion
waitForElementNotPresent() Related Assertion
waitForElementPresent() Related Assertion

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.

Parameters
string$locator1an element locator pointing to the first element (see Element Locators)
string$locator2an element locator pointing to the second element (see Element Locators)
Returns
bool true if element1 is the previous sibling of element2, false otherwise
See also
storeOrdered() Base method, from which has been generated (automatically) current method
assertNotOrdered() Related Assertion
assertOrdered() Related Assertion
verifyNotOrdered() Related Assertion
verifyOrdered() Related Assertion
waitForNotOrdered() Related Assertion
waitForOrdered() Related Assertion

Definition at line 7867 of file SeleniumTestCaseDoc.php.

isPromptPresent ( )

Has a prompt occurred?

This function never throws an exception .

Returns
bool true if there is a pending prompt
See also
storePromptPresent() Base method, from which has been generated (automatically) current method
assertPromptNotPresent() Related Assertion
assertPromptPresent() Related Assertion
verifyPromptNotPresent() Related Assertion
verifyPromptPresent() Related Assertion
waitForPromptNotPresent() Related Assertion
waitForPromptPresent() Related Assertion

Definition at line 13155 of file SeleniumTestCaseDoc.php.

isSomethingSelected (   $selectLocator)

Determines whether some option in a drop-down menu is selected.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
bool true if some option has been selected, false otherwise
See also
storeSomethingSelected() Base method, from which has been generated (automatically) current method
assertNotSomethingSelected() Related Assertion
assertSomethingSelected() Related Assertion
verifyNotSomethingSelected() Related Assertion
verifySomethingSelected() Related Assertion
waitForNotSomethingSelected() Related Assertion
waitForSomethingSelected() Related Assertion

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.

Parameters
string$patterna pattern to match with the text of the page (see String match Patterns)
Returns
bool true if the pattern matches the text, false otherwise
See also
storeTextPresent() Base method, from which has been generated (automatically) current method
assertTextNotPresent() Related Assertion
assertTextPresent() Related Assertion
verifyTextNotPresent() Related Assertion
verifyTextPresent() Related Assertion
waitForTextNotPresent() Related Assertion
waitForTextPresent() Related Assertion

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
bool true if the specified element is visible, false otherwise
See also
storeVisible() Base method, from which has been generated (automatically) current method
assertNotVisible() Related Assertion
assertVisible() Related Assertion
verifyNotVisible() Related Assertion
verifyVisible() Related Assertion
waitForNotVisible() Related Assertion
waitForVisible() Related Assertion

Definition at line 12105 of file SeleniumTestCaseDoc.php.

keyDown (   $locator,
  $keySequence 
)

Simulates a user pressing a key (without releasing it yet).

Parameters
string$locatoran element locator (see Element Locators)
string$keySequenceEither 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".
Returns
void
See also
keyDownAndWait() Related Action

Definition at line 14657 of file SeleniumTestCaseDoc.php.

keyDownAndWait (   $locator,
  $keySequence 
)

Simulates a user pressing a key (without releasing it yet).

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$keySequenceEither 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".
Returns
void
See also
keyDown() Base method, from which has been generated (automatically) current method

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.

Parameters
string$keycodean integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
Returns
void
See also
keyDownNativeAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$keycodean integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
Returns
void
See also
keyDownNative() Base method, from which has been generated (automatically) current method

Definition at line 14723 of file SeleniumTestCaseDoc.php.

keyPress (   $locator,
  $keySequence 
)

Simulates a user pressing and releasing a key.

Parameters
string$locatoran element locator (see Element Locators)
string$keySequenceEither 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".
Returns
void
See also
keyPressAndWait() Related Action

Definition at line 14741 of file SeleniumTestCaseDoc.php.

keyPressAndWait (   $locator,
  $keySequence 
)

Simulates a user pressing and releasing a key.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$keySequenceEither 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".
Returns
void
See also
keyPress() Base method, from which has been generated (automatically) current method

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.

Parameters
string$keycodean integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
Returns
void
See also
keyPressNativeAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$keycodean integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
Returns
void
See also
keyPressNative() Base method, from which has been generated (automatically) current method

Definition at line 14807 of file SeleniumTestCaseDoc.php.

keyUp (   $locator,
  $keySequence 
)

Simulates a user releasing a key.

Parameters
string$locatoran element locator (see Element Locators)
string$keySequenceEither 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".
Returns
void
See also
keyUpAndWait() Related Action

Definition at line 14825 of file SeleniumTestCaseDoc.php.

keyUpAndWait (   $locator,
  $keySequence 
)

Simulates a user releasing a key.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$keySequenceEither 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".
Returns
void
See also
keyUp() Base method, from which has been generated (automatically) current method

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.

Parameters
string$keycodean integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
Returns
void
See also
keyUpNativeAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$keycodean integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes!
Returns
void
See also
keyUpNative() Base method, from which has been generated (automatically) current method

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.

Returns
void
See also
metaKeyDownAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
metaKeyDown() Base method, from which has been generated (automatically) current method

Definition at line 14919 of file SeleniumTestCaseDoc.php.

metaKeyUp ( )

Release the meta key.

Returns
void
See also
metaKeyUpAndWait() Related Action

Definition at line 14931 of file SeleniumTestCaseDoc.php.

metaKeyUpAndWait ( )

Release the meta key.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
metaKeyUp() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseDownAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseDown() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
mouseDownAtAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
mouseDownAt() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseMoveAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseMove() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
mouseMoveAtAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
mouseMoveAt() Base method, from which has been generated (automatically) current method

Definition at line 15091 of file SeleniumTestCaseDoc.php.

mouseOut (   $locator)

Simulates a user moving the mouse pointer away from the specified element.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseOutAndWait() Related Action

Definition at line 15106 of file SeleniumTestCaseDoc.php.

mouseOutAndWait (   $locator)

Simulates a user moving the mouse pointer away from the specified element.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseOut() Base method, from which has been generated (automatically) current method

Definition at line 15125 of file SeleniumTestCaseDoc.php.

mouseOver (   $locator)

Simulates a user hovering a mouse over the specified element.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseOverAndWait() Related Action

Definition at line 15140 of file SeleniumTestCaseDoc.php.

mouseOverAndWait (   $locator)

Simulates a user hovering a mouse over the specified element.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseOver() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseUpAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseUp() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
mouseUpAtAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
mouseUpAt() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseUpRightAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
mouseUpRight() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
mouseUpRightAtAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$coordStringspecifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator.
Returns
void
See also
mouseUpRightAt() Base method, from which has been generated (automatically) current method

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.

Parameters
string$urlthe URL to open; may be relative or absolute
Returns
void

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").

Parameters
string$urlthe URL to open, which can be blank
string$windowIDthe JavaScript window ID of the window to select
Returns
void
See also
openWindowAndWait() Related Action

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").

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$urlthe URL to open, which can be blank
string$windowIDthe JavaScript window ID of the window to select
Returns
void
See also
openWindow() Base method, from which has been generated (automatically) current method

Definition at line 15376 of file SeleniumTestCaseDoc.php.

pause (   $waitTime)

Wait for the specified amount of time (in milliseconds).

Parameters
string$waitTimethe amount of time to sleep (in milliseconds)
Returns
void

Definition at line 15388 of file SeleniumTestCaseDoc.php.

refresh ( )

Simulates the user clicking the "Refresh" button on their browser.

Returns
void
See also
refreshAndWait() Related Action

Definition at line 15400 of file SeleniumTestCaseDoc.php.

refreshAndWait ( )

Simulates the user clicking the "Refresh" button on their browser.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
refresh() Base method, from which has been generated (automatically) current method

Definition at line 15416 of file SeleniumTestCaseDoc.php.

removeAllSelections (   $locator)

Unselects all of the selected options in a multi-select element.

Parameters
string$locatoran element locator identifying a multi-select box (see Element Locators)
Returns
void
See also
removeAllSelectionsAndWait() Related Action

Definition at line 15431 of file SeleniumTestCaseDoc.php.

removeAllSelectionsAndWait (   $locator)

Unselects all of the selected options in a multi-select element.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator identifying a multi-select box (see Element Locators)
Returns
void
See also
removeAllSelections() Base method, from which has been generated (automatically) current method

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.

Parameters
string$scriptTagIdthe id of the script element to remove.
Returns
void
See also
removeScriptAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$scriptTagIdthe id of the script element to remove.
Returns
void
See also
removeScript() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator identifying a multi-select box (see Element Locators)
string$optionLocatoran option locator (a label by default)
Returns
void
See also
removeSelectionAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator identifying a multi-select box (see Element Locators)
string$optionLocatoran option locator (a label by default)
Returns
void
See also
removeSelection() Base method, from which has been generated (automatically) current method

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.

Returns
string The last N log messages as a multi-line string.

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.

Parameters
string$rollupNamethe name of the rollup command
string$kwargskeyword arguments string that influences how the rollup expands into commands
Returns
void
See also
rollupAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$rollupNamethe name of the rollup command
string$kwargskeyword arguments string that influences how the rollup expands into commands
Returns
void
See also
rollup() Base method, from which has been generated (automatically) current method

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.

Parameters
string$scriptthe JavaScript snippet to run
Returns
void
See also
runScriptAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$scriptthe JavaScript snippet to run
Returns
void
See also
runScript() Base method, from which has been generated (automatically) current method

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.

  • label=labelPattern (label=regexp:^[Oo]ther)
    matches options based on their labels, i.e. the visible text. (This is the default.)
  • value=valuePattern (value=other)
    matches options based on their values.
  • id=id (id=option1)
    matches options based on their ids.
  • index=index (index=2)
    matches an option based on its index (offset from zero).

If no option locator prefix is provided, the default behaviour is to match on label.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$optionLocatoran option locator (a label by default)
Returns
void
See also
selectAndWait() Related Action

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.

  • label=labelPattern (label=regexp:^[Oo]ther)
    matches options based on their labels, i.e. the visible text. (This is the default.)
  • value=valuePattern (value=other)
    matches options based on their values.
  • id=id (id=option1)
    matches options based on their ids.
  • index=index (index=2)
    matches an option based on its index (offset from zero).

If no option locator prefix is provided, the default behaviour is to match on label.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$optionLocatoran option locator (a label by default)
Returns
void
See also
select() Base method, from which has been generated (automatically) current method

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"]] .

Parameters
string$locatoran element locator identifying a frame or iframe (see Element Locators)
Returns
void

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

  • If [windowID] is either not specified, or specified as "null", the first non-top window is selected. The top window is the one that would be selected by [selectWindow()] without providing a [windowID] . This should not be used when more than one popup window is in play.
  • Otherwise, the window will be looked up considering [windowID] as the following in order: 1) the "name" of the window, as specified to [window.open()]; 2) a javascript variable which is a reference to a window; and 3) the title of the window. This is the same ordered lookup performed by [selectWindow] .
Parameters
string$windowIDan identifier for the popup window, which can take on a number of different meanings
Returns
void
See also
selectPopUpAndWait() Related Action

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

  • If [windowID] is either not specified, or specified as "null", the first non-top window is selected. The top window is the one that would be selected by [selectWindow()] without providing a [windowID] . This should not be used when more than one popup window is in play.
  • Otherwise, the window will be looked up considering [windowID] as the following in order: 1) the "name" of the window, as specified to [window.open()]; 2) a javascript variable which is a reference to a window; and 3) the title of the window. This is the same ordered lookup performed by [selectWindow] .

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$windowIDan identifier for the popup window, which can take on a number of different meanings
Returns
void
See also
selectPopUp() Base method, from which has been generated (automatically) current method

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.

  • title=My Special Window: Finds the window using the text that appears in the title bar. Be careful; two windows can share the same title. If that happens, this locator will just pick one.
  • name=myWindow: Finds the window using its internal JavaScript "name" property. This is the second parameter "windowName" passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag) (which Selenium intercepts).
  • var=variableName: Some pop-up windows are unnamed (anonymous), but are associated with a JavaScript variable name in the current application window, e.g. "window.foo = window.open(url);". In those cases, you can open the window using "var=foo".

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").

Parameters
string$windowIDthe JavaScript window ID of the window to select
Returns
void

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.

Parameters
string$logLevelone of the following: "debug", "info", "warn", "error" or "off"
Returns
void
See also
setBrowserLogLevelAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$logLevelone of the following: "debug", "info", "warn", "error" or "off"
Returns
void
See also
setBrowserLogLevel() Base method, from which has been generated (automatically) current method

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.

Parameters
string$contextthe message to be sent to the browser
Returns
void

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.

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$positionthe 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.
Returns
void
See also
setCursorPositionAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$positionthe 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.
Returns
void
See also
setCursorPosition() Base method, from which has been generated (automatically) current method

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.

Parameters
string$pixelsthe number of pixels between "mousemove" events
Returns
void
See also
setMouseSpeedAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$pixelsthe number of pixels between "mousemove" events
Returns
void
See also
setMouseSpeed() Base method, from which has been generated (automatically) current method

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.

Parameters
string$valuethe number of milliseconds to pause after operation
Returns
void
See also
setSpeedAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$valuethe number of milliseconds to pause after operation
Returns
void
See also
setSpeed() Base method, from which has been generated (automatically) current method

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.

Returns
void
See also
shiftKeyDownAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
shiftKeyDown() Base method, from which has been generated (automatically) current method

Definition at line 16027 of file SeleniumTestCaseDoc.php.

shiftKeyUp ( )

Release the shift key.

Returns
void
See also
shiftKeyUpAndWait() Related Action

Definition at line 16039 of file SeleniumTestCaseDoc.php.

shiftKeyUpAndWait ( )

Release the shift key.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Returns
void
See also
shiftKeyUp() Base method, from which has been generated (automatically) current method

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.

Returns
void

Definition at line 16069 of file SeleniumTestCaseDoc.php.

store (   $expression,
  $variableName 
)

This command is a synonym for storeExpression.

Parameters
string$expressionthe value to store
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void

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.

Stored value:

The message of the most recent JavaScript alert (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertAlert() Related Assertion
assertNotAlert() Related Assertion
getAlert() Related Accessor
verifyAlert() Related Assertion
verifyNotAlert() Related Assertion
waitForAlert() Related Assertion
waitForNotAlert() Related Assertion

Definition at line 554 of file SeleniumTestCaseDoc.php.

storeAlertPresent (   $variableName)

Has an alert occurred?

This function never throws an exception .

Stored value:

true if there is an alert (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertAlertNotPresent() Related Assertion
assertAlertPresent() Related Assertion
isAlertPresent() Related Accessor
verifyAlertNotPresent() Related Assertion
verifyAlertPresent() Related Assertion
waitForAlertNotPresent() Related Assertion
waitForAlertPresent() Related Assertion

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.

Stored value:

the IDs of all buttons on the page (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertAllButtons() Related Assertion
assertNotAllButtons() Related Assertion
getAllButtons() Related Accessor
verifyAllButtons() Related Assertion
verifyNotAllButtons() Related Assertion
waitForAllButtons() Related Assertion
waitForNotAllButtons() Related Assertion

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.

Stored value:

the IDs of all field on the page (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertAllFields() Related Assertion
assertNotAllFields() Related Assertion
getAllFields() Related Accessor
verifyAllFields() Related Assertion
verifyNotAllFields() Related Assertion
waitForAllFields() Related Assertion
waitForNotAllFields() Related Assertion

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.

Stored value:

the IDs of all links on the page (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertAllLinks() Related Assertion
assertNotAllLinks() Related Assertion
getAllLinks() Related Accessor
verifyAllLinks() Related Assertion
verifyNotAllLinks() Related Assertion
waitForAllLinks() Related Assertion
waitForNotAllLinks() Related Assertion

Definition at line 1528 of file SeleniumTestCaseDoc.php.

storeAllWindowIds (   $variableName)

Returns the IDs of all windows that the browser knows about in an array.

Stored value:

Array of identifiers of all windows that the browser knows about. (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertAllWindowIds() Related Assertion
assertNotAllWindowIds() Related Assertion
getAllWindowIds() Related Accessor
verifyAllWindowIds() Related Assertion
verifyNotAllWindowIds() Related Assertion
waitForAllWindowIds() Related Assertion
waitForNotAllWindowIds() Related Assertion

Definition at line 1762 of file SeleniumTestCaseDoc.php.

storeAllWindowNames (   $variableName)

Returns the names of all windows that the browser knows about in an array.

Stored value:

Array of names of all windows that the browser knows about. (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertAllWindowNames() Related Assertion
assertNotAllWindowNames() Related Assertion
getAllWindowNames() Related Accessor
verifyAllWindowNames() Related Assertion
verifyNotAllWindowNames() Related Assertion
waitForAllWindowNames() Related Assertion
waitForNotAllWindowNames() Related Assertion

Definition at line 1988 of file SeleniumTestCaseDoc.php.

storeAllWindowTitles (   $variableName)

Returns the titles of all windows that the browser knows about in an array.

Stored value:

Array of titles of all windows that the browser knows about. (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertAllWindowTitles() Related Assertion
assertNotAllWindowTitles() Related Assertion
getAllWindowTitles() Related Accessor
verifyAllWindowTitles() Related Assertion
verifyNotAllWindowTitles() Related Assertion
waitForAllWindowTitles() Related Assertion
waitForNotAllWindowTitles() Related Assertion

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

Stored value:

the value of the specified attribute (see Stored Variables)

Parameters
string$attributeLocatoran element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertAttribute() Related Assertion
assertNotAttribute() Related Assertion
getAttribute() Related Accessor
verifyAttribute() Related Assertion
verifyNotAttribute() Related Assertion
waitForAttribute() Related Assertion
waitForNotAttribute() Related Assertion

Definition at line 2456 of file SeleniumTestCaseDoc.php.

storeAttributeFromAllWindows (   $attributeName,
  $variableName 
)

Returns an array of JavaScript property values from all known windows having one.

Stored value:

the set of values of this attribute from all known windows. (see Stored Variables)

Parameters
string$attributeNamename of an attribute on the windows
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertAttributeFromAllWindows() Related Assertion
assertNotAttributeFromAllWindows() Related Assertion
getAttributeFromAllWindows() Related Accessor
verifyAttributeFromAllWindows() Related Assertion
verifyNotAttributeFromAllWindows() Related Assertion
waitForAttributeFromAllWindows() Related Assertion
waitForNotAttributeFromAllWindows() Related Assertion

Definition at line 2706 of file SeleniumTestCaseDoc.php.

storeBodyText (   $variableName)

Gets the entire text of the page.

Stored value:

the entire text of the page (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertBodyText() Related Assertion
assertNotBodyText() Related Assertion
getBodyText() Related Accessor
verifyBodyText() Related Assertion
verifyNotBodyText() Related Assertion
waitForBodyText() Related Assertion
waitForNotBodyText() Related Assertion

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.

Stored value:

true if the checkbox is checked, false otherwise (see Stored Variables)

Parameters
string$locatoran element locator pointing to a checkbox or radio button (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertChecked() Related Assertion
assertNotChecked() Related Assertion
isChecked() Related Accessor
verifyChecked() Related Assertion
verifyNotChecked() Related Assertion
waitForChecked() Related Assertion
waitForNotChecked() Related Assertion

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.

Stored value:

the message of the most recent JavaScript confirmation dialog (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertConfirmation() Related Assertion
assertNotConfirmation() Related Assertion
getConfirmation() Related Accessor
verifyConfirmation() Related Assertion
verifyNotConfirmation() Related Assertion
waitForConfirmation() Related Assertion
waitForNotConfirmation() Related Assertion

Definition at line 3459 of file SeleniumTestCaseDoc.php.

storeConfirmationPresent (   $variableName)

Has confirm() been called?

This function never throws an exception .

Stored value:

true if there is a pending confirmation (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertConfirmationNotPresent() Related Assertion
assertConfirmationPresent() Related Assertion
isConfirmationPresent() Related Accessor
verifyConfirmationNotPresent() Related Assertion
verifyConfirmationPresent() Related Assertion
waitForConfirmationNotPresent() Related Assertion
waitForConfirmationPresent() Related Assertion

Definition at line 3734 of file SeleniumTestCaseDoc.php.

storeCookie (   $variableName)

Return all cookies of the current page under test.

Stored value:

all cookies of the current page under test (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertCookie() Related Assertion
assertNotCookie() Related Assertion
getCookie() Related Accessor
verifyCookie() Related Assertion
verifyNotCookie() Related Assertion
waitForCookie() Related Assertion
waitForNotCookie() Related Assertion

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.

Stored value:

the value of the cookie (see Stored Variables)

Parameters
string$namethe name of the cookie
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertCookieByName() Related Assertion
assertNotCookieByName() Related Assertion
getCookieByName() Related Accessor
verifyCookieByName() Related Assertion
verifyNotCookieByName() Related Assertion
waitForCookieByName() Related Assertion
waitForNotCookieByName() Related Assertion

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.

Stored value:

true if a cookie with the specified name is present, or false otherwise. (see Stored Variables)

Parameters
string$namethe name of the cookie
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertCookieNotPresent() Related Assertion
assertCookiePresent() Related Assertion
isCookiePresent() Related Accessor
verifyCookieNotPresent() Related Assertion
verifyCookiePresent() Related Assertion
waitForCookieNotPresent() Related Assertion
waitForCookiePresent() Related Assertion

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.

Stored value:

the numerical position of the cursor in the field (see Stored Variables)

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertCursorPosition() Related Assertion
assertNotCursorPosition() Related Assertion
getCursorPosition() Related Accessor
verifyCursorPosition() Related Assertion
verifyNotCursorPosition() Related Assertion
waitForCursorPosition() Related Assertion
waitForNotCursorPosition() Related Assertion

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.

Stored value:

true if the input element is editable, false otherwise (see Stored Variables)

Parameters
string$locatoran element locator (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertEditable() Related Assertion
assertNotEditable() Related Assertion
isEditable() Related Accessor
verifyEditable() Related Assertion
verifyNotEditable() Related Assertion
waitForEditable() Related Assertion
waitForNotEditable() Related Assertion

Definition at line 4947 of file SeleniumTestCaseDoc.php.

storeElementHeight (   $locator,
  $variableName 
)

Retrieves the height of an element.

Stored value:

height of an element in pixels (see Stored Variables)

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertElementHeight() Related Assertion
assertNotElementHeight() Related Assertion
getElementHeight() Related Accessor
verifyElementHeight() Related Assertion
verifyNotElementHeight() Related Assertion
waitForElementHeight() Related Assertion
waitForNotElementHeight() Related Assertion

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.

Stored value:

of relative index of the element to its parent (starting from 0) (see Stored Variables)

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertElementIndex() Related Assertion
assertNotElementIndex() Related Assertion
getElementIndex() Related Accessor
verifyElementIndex() Related Assertion
verifyNotElementIndex() Related Assertion
waitForElementIndex() Related Assertion
waitForNotElementIndex() Related Assertion

Definition at line 5440 of file SeleniumTestCaseDoc.php.

storeElementPositionLeft (   $locator,
  $variableName 
)

Retrieves the horizontal position of an element.

Stored value:

of pixels from the edge of the frame. (see Stored Variables)

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertElementPositionLeft() Related Assertion
assertNotElementPositionLeft() Related Assertion
getElementPositionLeft() Related Accessor
verifyElementPositionLeft() Related Assertion
verifyNotElementPositionLeft() Related Assertion
waitForElementPositionLeft() Related Assertion
waitForNotElementPositionLeft() Related Assertion

Definition at line 5920 of file SeleniumTestCaseDoc.php.

storeElementPositionTop (   $locator,
  $variableName 
)

Retrieves the vertical position of an element.

Stored value:

of pixels from the edge of the frame. (see Stored Variables)

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertElementPositionTop() Related Assertion
assertNotElementPositionTop() Related Assertion
getElementPositionTop() Related Accessor
verifyElementPositionTop() Related Assertion
verifyNotElementPositionTop() Related Assertion
waitForElementPositionTop() Related Assertion
waitForNotElementPositionTop() Related Assertion

Definition at line 6162 of file SeleniumTestCaseDoc.php.

storeElementPresent (   $locator,
  $variableName 
)

Verifies that the specified element is somewhere on the page.

Stored value:

true if the element is present, false otherwise (see Stored Variables)

Parameters
string$locatoran element locator (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertElementNotPresent() Related Assertion
assertElementPresent() Related Assertion
isElementPresent() Related Accessor
verifyElementNotPresent() Related Assertion
verifyElementPresent() Related Assertion
waitForElementNotPresent() Related Assertion
waitForElementPresent() Related Assertion

Definition at line 5686 of file SeleniumTestCaseDoc.php.

storeElementWidth (   $locator,
  $variableName 
)

Retrieves the width of an element.

Stored value:

width of an element in pixels (see Stored Variables)

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertElementWidth() Related Assertion
assertNotElementWidth() Related Assertion
getElementWidth() Related Accessor
verifyElementWidth() Related Assertion
verifyNotElementWidth() Related Assertion
waitForElementWidth() Related Assertion
waitForNotElementWidth() Related Assertion

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.

Stored value:

the results of evaluating the snippet (see Stored Variables)

Parameters
string$scriptthe JavaScript snippet to run
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertEval() Related Assertion
assertNotEval() Related Assertion
getEval() Related Accessor
verifyEval() Related Assertion
verifyNotEval() Related Assertion
waitForEval() Related Assertion
waitForNotEval() Related Assertion

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.

Stored value:

the value passed in (see Stored Variables)

Parameters
string$expressionthe value to return
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertExpression() Related Assertion
assertNotExpression() Related Assertion
getExpression() Related Accessor
verifyExpression() Related Assertion
verifyNotExpression() Related Assertion
waitForExpression() Related Assertion
waitForNotExpression() Related Assertion

Definition at line 6960 of file SeleniumTestCaseDoc.php.

storeHtmlSource (   $variableName)

Returns the entire HTML source between the opening and closing "html" tags.

Stored value:

the entire HTML source (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertHtmlSource() Related Assertion
assertNotHtmlSource() Related Assertion
getHtmlSource() Related Accessor
verifyHtmlSource() Related Assertion
verifyNotHtmlSource() Related Assertion
waitForHtmlSource() Related Assertion
waitForNotHtmlSource() Related Assertion

Definition at line 7201 of file SeleniumTestCaseDoc.php.

storeLocation (   $variableName)

Gets the absolute URL of the current page.

Stored value:

the absolute URL of the current page (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertLocation() Related Assertion
assertNotLocation() Related Assertion
getLocation() Related Accessor
verifyLocation() Related Assertion
verifyNotLocation() Related Assertion
waitForLocation() Related Assertion
waitForNotLocation() Related Assertion

Definition at line 7426 of file SeleniumTestCaseDoc.php.

storeMouseSpeed (   $variableName)

Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Stored value:

the number of pixels between "mousemove" events during dragAndDrop commands (default=10) (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertMouseSpeed() Related Assertion
assertNotMouseSpeed() Related Assertion
getMouseSpeed() Related Accessor
verifyMouseSpeed() Related Assertion
verifyNotMouseSpeed() Related Assertion
waitForMouseSpeed() Related Assertion
waitForNotMouseSpeed() Related Assertion

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.

Stored value:

true if element1 is the previous sibling of element2, false otherwise (see Stored Variables)

Parameters
string$locator1an element locator pointing to the first element (see Element Locators)
string$locator2an element locator pointing to the second element (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotOrdered() Related Assertion
assertOrdered() Related Assertion
isOrdered() Related Accessor
verifyNotOrdered() Related Assertion
verifyOrdered() Related Assertion
waitForNotOrdered() Related Assertion
waitForOrdered() Related Assertion

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.

Stored value:

the message of the most recent JavaScript question prompt (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertNotPrompt() Related Assertion
assertPrompt() Related Assertion
getPrompt() Related Accessor
verifyNotPrompt() Related Assertion
verifyPrompt() Related Assertion
waitForNotPrompt() Related Assertion
waitForPrompt() Related Assertion

Definition at line 8173 of file SeleniumTestCaseDoc.php.

storePromptPresent (   $variableName)

Has a prompt occurred?

This function never throws an exception .

Stored value:

true if there is a pending prompt (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertPromptNotPresent() Related Assertion
assertPromptPresent() Related Assertion
isPromptPresent() Related Accessor
verifyPromptNotPresent() Related Assertion
verifyPromptPresent() Related Assertion
waitForPromptNotPresent() Related Assertion
waitForPromptPresent() Related Assertion

Definition at line 13182 of file SeleniumTestCaseDoc.php.

storeSelectedId (   $selectLocator,
  $variableName 
)

Gets option element ID for selected option in the specified select element.

Stored value:

the selected option ID in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectedId() Related Assertion
assertSelectedId() Related Assertion
getSelectedId() Related Accessor
verifyNotSelectedId() Related Assertion
verifySelectedId() Related Assertion
waitForNotSelectedId() Related Assertion
waitForSelectedId() Related Assertion

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.

Stored value:

an array of all selected option IDs in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectedIds() Related Assertion
assertSelectedIds() Related Assertion
getSelectedIds() Related Accessor
verifyNotSelectedIds() Related Assertion
verifySelectedIds() Related Assertion
waitForNotSelectedIds() Related Assertion
waitForSelectedIds() Related Assertion

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.

Stored value:

the selected option index in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectedIndex() Related Assertion
assertSelectedIndex() Related Assertion
getSelectedIndex() Related Accessor
verifyNotSelectedIndex() Related Assertion
verifySelectedIndex() Related Assertion
waitForNotSelectedIndex() Related Assertion
waitForSelectedIndex() Related Assertion

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.

Stored value:

an array of all selected option indexes in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectedIndexes() Related Assertion
assertSelectedIndexes() Related Assertion
getSelectedIndexes() Related Accessor
verifyNotSelectedIndexes() Related Assertion
verifySelectedIndexes() Related Assertion
waitForNotSelectedIndexes() Related Assertion
waitForSelectedIndexes() Related Assertion

Definition at line 9416 of file SeleniumTestCaseDoc.php.

storeSelectedLabel (   $selectLocator,
  $variableName 
)

Gets option label (visible text) for selected option in the specified select element.

Stored value:

the selected option label in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectedLabel() Related Assertion
assertSelectedLabel() Related Assertion
getSelectedLabel() Related Accessor
verifyNotSelectedLabel() Related Assertion
verifySelectedLabel() Related Assertion
waitForNotSelectedLabel() Related Assertion
waitForSelectedLabel() Related Assertion

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.

Stored value:

an array of all selected option labels in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectedLabels() Related Assertion
assertSelectedLabels() Related Assertion
getSelectedLabels() Related Accessor
verifyNotSelectedLabels() Related Assertion
verifySelectedLabels() Related Assertion
waitForNotSelectedLabels() Related Assertion
waitForSelectedLabels() Related Assertion

Definition at line 9908 of file SeleniumTestCaseDoc.php.

storeSelectedValue (   $selectLocator,
  $variableName 
)

Gets option value (value attribute) for selected option in the specified select element.

Stored value:

the selected option value in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectedValue() Related Assertion
assertSelectedValue() Related Assertion
getSelectedValue() Related Accessor
verifyNotSelectedValue() Related Assertion
verifySelectedValue() Related Assertion
waitForNotSelectedValue() Related Assertion
waitForSelectedValue() Related Assertion

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.

Stored value:

an array of all selected option values in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectedValues() Related Assertion
assertSelectedValues() Related Assertion
getSelectedValues() Related Accessor
verifyNotSelectedValues() Related Assertion
verifySelectedValues() Related Assertion
waitForNotSelectedValues() Related Assertion
waitForSelectedValues() Related Assertion

Definition at line 10400 of file SeleniumTestCaseDoc.php.

storeSelectOptions (   $selectLocator,
  $variableName 
)

Gets all option labels in the specified select drop-down.

Stored value:

an array of all option labels in the specified select drop-down (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSelectOptions() Related Assertion
assertSelectOptions() Related Assertion
getSelectOptions() Related Accessor
verifyNotSelectOptions() Related Assertion
verifySelectOptions() Related Assertion
waitForNotSelectOptions() Related Assertion
waitForSelectOptions() Related Assertion

Definition at line 8440 of file SeleniumTestCaseDoc.php.

storeSomethingSelected (   $selectLocator,
  $variableName 
)

Determines whether some option in a drop-down menu is selected.

Stored value:

true if some option has been selected, false otherwise (see Stored Variables)

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotSomethingSelected() Related Assertion
assertSomethingSelected() Related Assertion
isSomethingSelected() Related Accessor
verifyNotSomethingSelected() Related Assertion
verifySomethingSelected() Related Assertion
waitForNotSomethingSelected() Related Assertion
waitForSomethingSelected() Related Assertion

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.

Stored value:

the execution speed in milliseconds. (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertNotSpeed() Related Assertion
assertSpeed() Related Assertion
getSpeed() Related Accessor
verifyNotSpeed() Related Assertion
verifySpeed() Related Assertion
waitForNotSpeed() Related Assertion
waitForSpeed() Related Assertion

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.

Stored value:

the text from the specified cell (see Stored Variables)

Parameters
string$tableCellAddressa cell address, e.g. "foo.1.4"
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotTable() Related Assertion
assertTable() Related Assertion
getTable() Related Accessor
verifyNotTable() Related Assertion
verifyTable() Related Assertion
waitForNotTable() Related Assertion
waitForTable() Related Assertion

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.

Stored value:

the text of the element (see Stored Variables)

Parameters
string$locatoran element locator (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotText() Related Assertion
assertText() Related Assertion
getText() Related Accessor
verifyNotText() Related Assertion
verifyText() Related Assertion
waitForNotText() Related Assertion
waitForText() Related Assertion

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.

Stored value:

true if the pattern matches the text, false otherwise (see Stored Variables)

Parameters
string$patterna pattern to match with the text of the page (see String match Patterns)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertTextNotPresent() Related Assertion
assertTextPresent() Related Assertion
isTextPresent() Related Accessor
verifyTextNotPresent() Related Assertion
verifyTextPresent() Related Assertion
waitForTextNotPresent() Related Assertion
waitForTextPresent() Related Assertion

Definition at line 13409 of file SeleniumTestCaseDoc.php.

storeTitle (   $variableName)

Gets the title of the current page.

Stored value:

the title of the current page (see Stored Variables)

Parameters
string$variableNamethe name of a variable in which the result is to be stored (see Stored Variables)
Returns
void
See also
assertNotTitle() Related Assertion
assertTitle() Related Assertion
getTitle() Related Accessor
verifyNotTitle() Related Assertion
verifyTitle() Related Assertion
waitForNotTitle() Related Assertion
waitForTitle() Related Assertion

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.

Stored value:

the element value, or "on/off" for checkbox/radio elements (see Stored Variables)

Parameters
string$locatoran element locator (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotValue() Related Assertion
assertValue() Related Assertion
getValue() Related Accessor
verifyNotValue() Related Assertion
verifyValue() Related Assertion
waitForNotValue() Related Assertion
waitForValue() Related Assertion

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.

Stored value:

true if the specified element is visible, false otherwise (see Stored Variables)

Parameters
string$locatoran element locator (see Element Locators)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotVisible() Related Assertion
assertVisible() Related Assertion
isVisible() Related Accessor
verifyNotVisible() Related Assertion
verifyVisible() Related Assertion
waitForNotVisible() Related Assertion
waitForVisible() Related Assertion

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.

Stored value:

true if the new frame is this code's window (see Stored Variables)

Parameters
string$currentFrameStringstarting frame
string$targetnew frame (which might be relative to the current one)
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotWhetherThisFrameMatchFrameExpression() Related Assertion
assertWhetherThisFrameMatchFrameExpression() Related Assertion
getWhetherThisFrameMatchFrameExpression() Related Accessor
verifyNotWhetherThisFrameMatchFrameExpression() Related Assertion
verifyWhetherThisFrameMatchFrameExpression() Related Assertion
waitForNotWhetherThisFrameMatchFrameExpression() Related Assertion
waitForWhetherThisFrameMatchFrameExpression() Related Assertion

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.

Stored value:

true if the new window is this code's window (see Stored Variables)

Parameters
string$currentWindowStringstarting window
string$targetnew window (which might be relative to the current one, e.g., "_parent")
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotWhetherThisWindowMatchWindowExpression() Related Assertion
assertWhetherThisWindowMatchWindowExpression() Related Assertion
getWhetherThisWindowMatchWindowExpression() Related Accessor
verifyNotWhetherThisWindowMatchWindowExpression() Related Assertion
verifyWhetherThisWindowMatchWindowExpression() Related Assertion
waitForNotWhetherThisWindowMatchWindowExpression() Related Assertion
waitForWhetherThisWindowMatchWindowExpression() Related Assertion

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.

Stored value:

the number of nodes that match the specified xpath (see Stored Variables)

Parameters
string$xpaththe xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
string$variableNamethe name of a variable in which the result is to be stored. (see Stored Variables)
Returns
void
See also
assertNotXpathCount() Related Assertion
assertXpathCount() Related Assertion
getXpathCount() Related Accessor
verifyNotXpathCount() Related Assertion
verifyXpathCount() Related Assertion
waitForNotXpathCount() Related Assertion
waitForXpathCount() Related Assertion

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.

Parameters
string$formLocatoran element locator for the form you want to submit (see Element Locators)
Returns
void
See also
submitAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$formLocatoran element locator for the form you want to submit (see Element Locators)
Returns
void
See also
submit() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
string$valuethe value to type
Returns
void
See also
typeAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$valuethe value to type
Returns
void
See also
type() Base method, from which has been generated (automatically) current method

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.

Parameters
string$locatoran element locator (see Element Locators)
string$valuethe value to type
Returns
void
See also
typeKeysAndWait() Related Action

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.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
string$valuethe value to type
Returns
void
See also
typeKeys() Base method, from which has been generated (automatically) current method

Definition at line 16223 of file SeleniumTestCaseDoc.php.

uncheck (   $locator)

Uncheck a toggle-button (checkbox/radio).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
uncheckAndWait() Related Action

Definition at line 16238 of file SeleniumTestCaseDoc.php.

uncheckAndWait (   $locator)

Uncheck a toggle-button (checkbox/radio).

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
uncheck() Base method, from which has been generated (automatically) current method

Definition at line 16257 of file SeleniumTestCaseDoc.php.

useXpathLibrary (   $libraryName)

Allows choice of one of the available libraries.

Parameters
string$libraryNamename 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.
Returns
void
See also
useXpathLibraryAndWait() Related Action

Definition at line 16280 of file SeleniumTestCaseDoc.php.

useXpathLibraryAndWait (   $libraryName)

Allows choice of one of the available libraries.

Notes:

After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())

Parameters
string$libraryNamename 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.
Returns
void
See also
useXpathLibrary() Base method, from which has been generated (automatically) current method

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.

Value to verify:

The message of the most recent JavaScript alert

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlert()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAlert() Base method, from which has been generated (automatically) current method
assertAlert() Related Assertion
assertNotAlert() Related Assertion
getAlert() Related Accessor
verifyNotAlert() Related Assertion
waitForAlert() Related Assertion
waitForNotAlert() Related Assertion

Definition at line 593 of file SeleniumTestCaseDoc.php.

verifyAlertNotPresent ( )

Assertion: Has an alert occurred?

This function never throws an exception .

Value to verify:

true if there is an alert

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlertNotPresent()).

Returns
void
See also
storeAlertPresent() Base method, from which has been generated (automatically) current method
assertAlertNotPresent() Related Assertion
assertAlertPresent() Related Assertion
isAlertPresent() Related Accessor
verifyAlertPresent() Related Assertion
waitForAlertNotPresent() Related Assertion
waitForAlertPresent() Related Assertion

Definition at line 846 of file SeleniumTestCaseDoc.php.

verifyAlertPresent ( )

Assertion: Has an alert occurred?

This function never throws an exception .

Value to verify:

true if there is an alert

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlertPresent()).

Returns
void
See also
storeAlertPresent() Base method, from which has been generated (automatically) current method
assertAlertNotPresent() Related Assertion
assertAlertPresent() Related Assertion
isAlertPresent() Related Accessor
verifyAlertNotPresent() Related Assertion
waitForAlertNotPresent() Related Assertion
waitForAlertPresent() Related Assertion

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.

Value to verify:

the IDs of all buttons on the page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllButtons()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllButtons() Base method, from which has been generated (automatically) current method
assertAllButtons() Related Assertion
assertNotAllButtons() Related Assertion
getAllButtons() Related Accessor
verifyNotAllButtons() Related Assertion
waitForAllButtons() Related Assertion
waitForNotAllButtons() Related Assertion

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.

Value to verify:

the IDs of all field on the page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllFields()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllFields() Base method, from which has been generated (automatically) current method
assertAllFields() Related Assertion
assertNotAllFields() Related Assertion
getAllFields() Related Accessor
verifyNotAllFields() Related Assertion
waitForAllFields() Related Assertion
waitForNotAllFields() Related Assertion

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.

Value to verify:

the IDs of all links on the page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllLinks()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllLinks() Base method, from which has been generated (automatically) current method
assertAllLinks() Related Assertion
assertNotAllLinks() Related Assertion
getAllLinks() Related Accessor
verifyNotAllLinks() Related Assertion
waitForAllLinks() Related Assertion
waitForNotAllLinks() Related Assertion

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.

Value to verify:

Array of identifiers of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowIds()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowIds() Base method, from which has been generated (automatically) current method
assertAllWindowIds() Related Assertion
assertNotAllWindowIds() Related Assertion
getAllWindowIds() Related Accessor
verifyNotAllWindowIds() Related Assertion
waitForAllWindowIds() Related Assertion
waitForNotAllWindowIds() Related Assertion

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.

Value to verify:

Array of names of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowNames()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowNames() Base method, from which has been generated (automatically) current method
assertAllWindowNames() Related Assertion
assertNotAllWindowNames() Related Assertion
getAllWindowNames() Related Accessor
verifyNotAllWindowNames() Related Assertion
waitForAllWindowNames() Related Assertion
waitForNotAllWindowNames() Related Assertion

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.

Value to verify:

Array of titles of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowTitles()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowTitles() Base method, from which has been generated (automatically) current method
assertAllWindowTitles() Related Assertion
assertNotAllWindowTitles() Related Assertion
getAllWindowTitles() Related Accessor
verifyNotAllWindowTitles() Related Assertion
waitForAllWindowTitles() Related Assertion
waitForNotAllWindowTitles() Related Assertion

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

Value to verify:

the value of the specified attribute

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAttribute()).

Parameters
string$attributeLocatoran element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttribute() Base method, from which has been generated (automatically) current method
assertAttribute() Related Assertion
assertNotAttribute() Related Assertion
getAttribute() Related Accessor
verifyNotAttribute() Related Assertion
waitForAttribute() Related Assertion
waitForNotAttribute() Related Assertion

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.

Value to verify:

the set of values of this attribute from all known windows.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertAttributeFromAllWindows()).

Parameters
string$attributeNamename of an attribute on the windows
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttributeFromAllWindows() Base method, from which has been generated (automatically) current method
assertAttributeFromAllWindows() Related Assertion
assertNotAttributeFromAllWindows() Related Assertion
getAttributeFromAllWindows() Related Accessor
verifyNotAttributeFromAllWindows() Related Assertion
waitForAttributeFromAllWindows() Related Assertion
waitForNotAttributeFromAllWindows() Related Assertion

Definition at line 2738 of file SeleniumTestCaseDoc.php.

verifyBodyText (   $pattern)

Assertion: Gets the entire text of the page.

Value to verify:

the entire text of the page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertBodyText()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeBodyText() Base method, from which has been generated (automatically) current method
assertBodyText() Related Assertion
assertNotBodyText() Related Assertion
getBodyText() Related Accessor
verifyNotBodyText() Related Assertion
waitForBodyText() Related Assertion
waitForNotBodyText() Related Assertion

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.

Value to verify:

true if the checkbox is checked, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertChecked()).

Parameters
string$locatoran element locator pointing to a checkbox or radio button (see Element Locators)
Returns
void
See also
storeChecked() Base method, from which has been generated (automatically) current method
assertChecked() Related Assertion
assertNotChecked() Related Assertion
isChecked() Related Accessor
verifyNotChecked() Related Assertion
waitForChecked() Related Assertion
waitForNotChecked() Related Assertion

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.

Value to verify:

the message of the most recent JavaScript confirmation dialog

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmation()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeConfirmation() Base method, from which has been generated (automatically) current method
assertConfirmation() Related Assertion
assertNotConfirmation() Related Assertion
getConfirmation() Related Accessor
verifyNotConfirmation() Related Assertion
waitForConfirmation() Related Assertion
waitForNotConfirmation() Related Assertion

Definition at line 3501 of file SeleniumTestCaseDoc.php.

verifyConfirmationNotPresent ( )

Assertion: Has confirm() been called?

This function never throws an exception .

Value to verify:

true if there is a pending confirmation

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmationNotPresent()).

Returns
void
See also
storeConfirmationPresent() Base method, from which has been generated (automatically) current method
assertConfirmationNotPresent() Related Assertion
assertConfirmationPresent() Related Assertion
isConfirmationPresent() Related Accessor
verifyConfirmationPresent() Related Assertion
waitForConfirmationNotPresent() Related Assertion
waitForConfirmationPresent() Related Assertion

Definition at line 3763 of file SeleniumTestCaseDoc.php.

verifyConfirmationPresent ( )

Assertion: Has confirm() been called?

This function never throws an exception .

Value to verify:

true if there is a pending confirmation

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmationPresent()).

Returns
void
See also
storeConfirmationPresent() Base method, from which has been generated (automatically) current method
assertConfirmationNotPresent() Related Assertion
assertConfirmationPresent() Related Assertion
isConfirmationPresent() Related Accessor
verifyConfirmationNotPresent() Related Assertion
waitForConfirmationNotPresent() Related Assertion
waitForConfirmationPresent() Related Assertion

Definition at line 3792 of file SeleniumTestCaseDoc.php.

verifyCookie (   $pattern)

Assertion: Return all cookies of the current page under test.

Value to verify:

all cookies of the current page under test

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookie()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookie() Base method, from which has been generated (automatically) current method
assertCookie() Related Assertion
assertNotCookie() Related Assertion
getCookie() Related Accessor
verifyNotCookie() Related Assertion
waitForCookie() Related Assertion
waitForNotCookie() Related Assertion

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.

Value to verify:

the value of the cookie

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookieByName()).

Parameters
string$namethe name of the cookie
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookieByName() Base method, from which has been generated (automatically) current method
assertCookieByName() Related Assertion
assertNotCookieByName() Related Assertion
getCookieByName() Related Accessor
verifyNotCookieByName() Related Assertion
waitForCookieByName() Related Assertion
waitForNotCookieByName() Related Assertion

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.

Value to verify:

true if a cookie with the specified name is present, or false otherwise.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookieNotPresent()).

Parameters
string$namethe name of the cookie
Returns
void
See also
storeCookiePresent() Base method, from which has been generated (automatically) current method
assertCookieNotPresent() Related Assertion
assertCookiePresent() Related Assertion
isCookiePresent() Related Accessor
verifyCookiePresent() Related Assertion
waitForCookieNotPresent() Related Assertion
waitForCookiePresent() Related Assertion

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.

Value to verify:

true if a cookie with the specified name is present, or false otherwise.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookiePresent()).

Parameters
string$namethe name of the cookie
Returns
void
See also
storeCookiePresent() Base method, from which has been generated (automatically) current method
assertCookieNotPresent() Related Assertion
assertCookiePresent() Related Assertion
isCookiePresent() Related Accessor
verifyCookieNotPresent() Related Assertion
waitForCookieNotPresent() Related Assertion
waitForCookiePresent() Related Assertion

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.

Value to verify:

the numerical position of the cursor in the field

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertCursorPosition()).

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCursorPosition() Base method, from which has been generated (automatically) current method
assertCursorPosition() Related Assertion
assertNotCursorPosition() Related Assertion
getCursorPosition() Related Accessor
verifyNotCursorPosition() Related Assertion
waitForCursorPosition() Related Assertion
waitForNotCursorPosition() Related Assertion

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.

Value to verify:

true if the input element is editable, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertEditable()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeEditable() Base method, from which has been generated (automatically) current method
assertEditable() Related Assertion
assertNotEditable() Related Assertion
isEditable() Related Accessor
verifyNotEditable() Related Assertion
waitForEditable() Related Assertion
waitForNotEditable() Related Assertion

Definition at line 4979 of file SeleniumTestCaseDoc.php.

verifyElementHeight (   $locator,
  $pattern 
)

Assertion: Retrieves the height of an element.

Value to verify:

height of an element in pixels

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementHeight()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementHeight() Base method, from which has been generated (automatically) current method
assertElementHeight() Related Assertion
assertNotElementHeight() Related Assertion
getElementHeight() Related Accessor
verifyNotElementHeight() Related Assertion
waitForElementHeight() Related Assertion
waitForNotElementHeight() Related Assertion

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.

Value to verify:

of relative index of the element to its parent (starting from 0)

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementIndex()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementIndex() Base method, from which has been generated (automatically) current method
assertElementIndex() Related Assertion
assertNotElementIndex() Related Assertion
getElementIndex() Related Accessor
verifyNotElementIndex() Related Assertion
waitForElementIndex() Related Assertion
waitForNotElementIndex() Related Assertion

Definition at line 5474 of file SeleniumTestCaseDoc.php.

verifyElementNotPresent (   $locator)

Assertion: Verifies that the specified element is somewhere on the page.

Value to verify:

true if the element is present, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementNotPresent()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeElementPresent() Base method, from which has been generated (automatically) current method
assertElementNotPresent() Related Assertion
assertElementPresent() Related Assertion
isElementPresent() Related Accessor
verifyElementPresent() Related Assertion
waitForElementNotPresent() Related Assertion
waitForElementPresent() Related Assertion

Definition at line 5716 of file SeleniumTestCaseDoc.php.

verifyElementPositionLeft (   $locator,
  $pattern 
)

Assertion: Retrieves the horizontal position of an element.

Value to verify:

of pixels from the edge of the frame.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPositionLeft()).

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionLeft() Base method, from which has been generated (automatically) current method
assertElementPositionLeft() Related Assertion
assertNotElementPositionLeft() Related Assertion
getElementPositionLeft() Related Accessor
verifyNotElementPositionLeft() Related Assertion
waitForElementPositionLeft() Related Assertion
waitForNotElementPositionLeft() Related Assertion

Definition at line 5952 of file SeleniumTestCaseDoc.php.

verifyElementPositionTop (   $locator,
  $pattern 
)

Assertion: Retrieves the vertical position of an element.

Value to verify:

of pixels from the edge of the frame.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPositionTop()).

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionTop() Base method, from which has been generated (automatically) current method
assertElementPositionTop() Related Assertion
assertNotElementPositionTop() Related Assertion
getElementPositionTop() Related Accessor
verifyNotElementPositionTop() Related Assertion
waitForElementPositionTop() Related Assertion
waitForNotElementPositionTop() Related Assertion

Definition at line 6194 of file SeleniumTestCaseDoc.php.

verifyElementPresent (   $locator)

Assertion: Verifies that the specified element is somewhere on the page.

Value to verify:

true if the element is present, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPresent()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeElementPresent() Base method, from which has been generated (automatically) current method
assertElementNotPresent() Related Assertion
assertElementPresent() Related Assertion
isElementPresent() Related Accessor
verifyElementNotPresent() Related Assertion
waitForElementNotPresent() Related Assertion
waitForElementPresent() Related Assertion

Definition at line 5746 of file SeleniumTestCaseDoc.php.

verifyElementWidth (   $locator,
  $pattern 
)

Assertion: Retrieves the width of an element.

Value to verify:

width of an element in pixels

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementWidth()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementWidth() Base method, from which has been generated (automatically) current method
assertElementWidth() Related Assertion
assertNotElementWidth() Related Assertion
getElementWidth() Related Accessor
verifyNotElementWidth() Related Assertion
waitForElementWidth() Related Assertion
waitForNotElementWidth() Related Assertion

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.

Value to verify:

the results of evaluating the snippet

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertEval()).

Parameters
string$scriptthe JavaScript snippet to run
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeEval() Base method, from which has been generated (automatically) current method
assertEval() Related Assertion
assertNotEval() Related Assertion
getEval() Related Accessor
verifyNotEval() Related Assertion
waitForEval() Related Assertion
waitForNotEval() Related Assertion

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.

Value to verify:

the value passed in

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertExpression()).

Parameters
string$expressionthe value to return
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeExpression() Base method, from which has been generated (automatically) current method
assertExpression() Related Assertion
assertNotExpression() Related Assertion
getExpression() Related Accessor
verifyNotExpression() Related Assertion
waitForExpression() Related Assertion
waitForNotExpression() Related Assertion

Definition at line 6994 of file SeleniumTestCaseDoc.php.

verifyHtmlSource (   $pattern)

Assertion: Returns the entire HTML source between the opening and closing "html" tags.

Value to verify:

the entire HTML source

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertHtmlSource()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeHtmlSource() Base method, from which has been generated (automatically) current method
assertHtmlSource() Related Assertion
assertNotHtmlSource() Related Assertion
getHtmlSource() Related Accessor
verifyNotHtmlSource() Related Assertion
waitForHtmlSource() Related Assertion
waitForNotHtmlSource() Related Assertion

Definition at line 7231 of file SeleniumTestCaseDoc.php.

verifyLocation (   $pattern)

Assertion: Gets the absolute URL of the current page.

Value to verify:

the absolute URL of the current page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertLocation()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeLocation() Base method, from which has been generated (automatically) current method
assertLocation() Related Assertion
assertNotLocation() Related Assertion
getLocation() Related Accessor
verifyNotLocation() Related Assertion
waitForLocation() Related Assertion
waitForNotLocation() Related Assertion

Definition at line 7456 of file SeleniumTestCaseDoc.php.

verifyMouseSpeed (   $pattern)

Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Value to verify:

the number of pixels between "mousemove" events during dragAndDrop commands (default=10)

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertMouseSpeed()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeMouseSpeed() Base method, from which has been generated (automatically) current method
assertMouseSpeed() Related Assertion
assertNotMouseSpeed() Related Assertion
getMouseSpeed() Related Accessor
verifyNotMouseSpeed() Related Assertion
waitForMouseSpeed() Related Assertion
waitForNotMouseSpeed() Related Assertion

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.

Value to verify:

The message of the most recent JavaScript alert

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAlert()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAlert() Base method, from which has been generated (automatically) current method
assertAlert() Related Assertion
assertNotAlert() Related Assertion
getAlert() Related Accessor
verifyAlert() Related Assertion
waitForAlert() Related Assertion
waitForNotAlert() Related Assertion

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.

Value to verify:

the IDs of all buttons on the page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllButtons()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllButtons() Base method, from which has been generated (automatically) current method
assertAllButtons() Related Assertion
assertNotAllButtons() Related Assertion
getAllButtons() Related Accessor
verifyAllButtons() Related Assertion
waitForAllButtons() Related Assertion
waitForNotAllButtons() Related Assertion

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.

Value to verify:

the IDs of all field on the page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllFields()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllFields() Base method, from which has been generated (automatically) current method
assertAllFields() Related Assertion
assertNotAllFields() Related Assertion
getAllFields() Related Accessor
verifyAllFields() Related Assertion
waitForAllFields() Related Assertion
waitForNotAllFields() Related Assertion

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.

Value to verify:

the IDs of all links on the page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllLinks()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllLinks() Base method, from which has been generated (automatically) current method
assertAllLinks() Related Assertion
assertNotAllLinks() Related Assertion
getAllLinks() Related Accessor
verifyAllLinks() Related Assertion
waitForAllLinks() Related Assertion
waitForNotAllLinks() Related Assertion

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.

Value to verify:

Array of identifiers of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowIds()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowIds() Base method, from which has been generated (automatically) current method
assertAllWindowIds() Related Assertion
assertNotAllWindowIds() Related Assertion
getAllWindowIds() Related Accessor
verifyAllWindowIds() Related Assertion
waitForAllWindowIds() Related Assertion
waitForNotAllWindowIds() Related Assertion

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.

Value to verify:

Array of names of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowNames()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowNames() Base method, from which has been generated (automatically) current method
assertAllWindowNames() Related Assertion
assertNotAllWindowNames() Related Assertion
getAllWindowNames() Related Accessor
verifyAllWindowNames() Related Assertion
waitForAllWindowNames() Related Assertion
waitForNotAllWindowNames() Related Assertion

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.

Value to verify:

Array of titles of all windows that the browser knows about.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowTitles()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowTitles() Base method, from which has been generated (automatically) current method
assertAllWindowTitles() Related Assertion
assertNotAllWindowTitles() Related Assertion
getAllWindowTitles() Related Accessor
verifyAllWindowTitles() Related Assertion
waitForAllWindowTitles() Related Assertion
waitForNotAllWindowTitles() Related Assertion

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

Value to verify:

the value of the specified attribute

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAttribute()).

Parameters
string$attributeLocatoran element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttribute() Base method, from which has been generated (automatically) current method
assertAttribute() Related Assertion
assertNotAttribute() Related Assertion
getAttribute() Related Accessor
verifyAttribute() Related Assertion
waitForAttribute() Related Assertion
waitForNotAttribute() Related Assertion

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.

Value to verify:

the set of values of this attribute from all known windows.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAttributeFromAllWindows()).

Parameters
string$attributeNamename of an attribute on the windows
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttributeFromAllWindows() Base method, from which has been generated (automatically) current method
assertAttributeFromAllWindows() Related Assertion
assertNotAttributeFromAllWindows() Related Assertion
getAttributeFromAllWindows() Related Accessor
verifyAttributeFromAllWindows() Related Assertion
waitForAttributeFromAllWindows() Related Assertion
waitForNotAttributeFromAllWindows() Related Assertion

Definition at line 2770 of file SeleniumTestCaseDoc.php.

verifyNotBodyText (   $pattern)

Assertion: Gets the entire text of the page.

Value to verify:

the entire text of the page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotBodyText()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeBodyText() Base method, from which has been generated (automatically) current method
assertBodyText() Related Assertion
assertNotBodyText() Related Assertion
getBodyText() Related Accessor
verifyBodyText() Related Assertion
waitForBodyText() Related Assertion
waitForNotBodyText() Related Assertion

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.

Value to verify:

true if the checkbox is checked, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotChecked()).

Parameters
string$locatoran element locator pointing to a checkbox or radio button (see Element Locators)
Returns
void
See also
storeChecked() Base method, from which has been generated (automatically) current method
assertChecked() Related Assertion
assertNotChecked() Related Assertion
isChecked() Related Accessor
verifyChecked() Related Assertion
waitForChecked() Related Assertion
waitForNotChecked() Related Assertion

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.

Value to verify:

the message of the most recent JavaScript confirmation dialog

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotConfirmation()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeConfirmation() Base method, from which has been generated (automatically) current method
assertConfirmation() Related Assertion
assertNotConfirmation() Related Assertion
getConfirmation() Related Accessor
verifyConfirmation() Related Assertion
waitForConfirmation() Related Assertion
waitForNotConfirmation() Related Assertion

Definition at line 3543 of file SeleniumTestCaseDoc.php.

verifyNotCookie (   $pattern)

Assertion: Return all cookies of the current page under test.

Value to verify:

all cookies of the current page under test

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCookie()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookie() Base method, from which has been generated (automatically) current method
assertCookie() Related Assertion
assertNotCookie() Related Assertion
getCookie() Related Accessor
verifyCookie() Related Assertion
waitForCookie() Related Assertion
waitForNotCookie() Related Assertion

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.

Value to verify:

the value of the cookie

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCookieByName()).

Parameters
string$namethe name of the cookie
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookieByName() Base method, from which has been generated (automatically) current method
assertCookieByName() Related Assertion
assertNotCookieByName() Related Assertion
getCookieByName() Related Accessor
verifyCookieByName() Related Assertion
waitForCookieByName() Related Assertion
waitForNotCookieByName() Related Assertion

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.

Value to verify:

the numerical position of the cursor in the field

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCursorPosition()).

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCursorPosition() Base method, from which has been generated (automatically) current method
assertCursorPosition() Related Assertion
assertNotCursorPosition() Related Assertion
getCursorPosition() Related Accessor
verifyCursorPosition() Related Assertion
waitForCursorPosition() Related Assertion
waitForNotCursorPosition() Related Assertion

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.

Value to verify:

true if the input element is editable, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotEditable()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeEditable() Base method, from which has been generated (automatically) current method
assertEditable() Related Assertion
assertNotEditable() Related Assertion
isEditable() Related Accessor
verifyEditable() Related Assertion
waitForEditable() Related Assertion
waitForNotEditable() Related Assertion

Definition at line 5011 of file SeleniumTestCaseDoc.php.

verifyNotElementHeight (   $locator,
  $pattern 
)

Assertion: Retrieves the height of an element.

Value to verify:

height of an element in pixels

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementHeight()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementHeight() Base method, from which has been generated (automatically) current method
assertElementHeight() Related Assertion
assertNotElementHeight() Related Assertion
getElementHeight() Related Accessor
verifyElementHeight() Related Assertion
waitForElementHeight() Related Assertion
waitForNotElementHeight() Related Assertion

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.

Value to verify:

of relative index of the element to its parent (starting from 0)

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementIndex()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementIndex() Base method, from which has been generated (automatically) current method
assertElementIndex() Related Assertion
assertNotElementIndex() Related Assertion
getElementIndex() Related Accessor
verifyElementIndex() Related Assertion
waitForElementIndex() Related Assertion
waitForNotElementIndex() Related Assertion

Definition at line 5508 of file SeleniumTestCaseDoc.php.

verifyNotElementPositionLeft (   $locator,
  $pattern 
)

Assertion: Retrieves the horizontal position of an element.

Value to verify:

of pixels from the edge of the frame.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementPositionLeft()).

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionLeft() Base method, from which has been generated (automatically) current method
assertElementPositionLeft() Related Assertion
assertNotElementPositionLeft() Related Assertion
getElementPositionLeft() Related Accessor
verifyElementPositionLeft() Related Assertion
waitForElementPositionLeft() Related Assertion
waitForNotElementPositionLeft() Related Assertion

Definition at line 5984 of file SeleniumTestCaseDoc.php.

verifyNotElementPositionTop (   $locator,
  $pattern 
)

Assertion: Retrieves the vertical position of an element.

Value to verify:

of pixels from the edge of the frame.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementPositionTop()).

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionTop() Base method, from which has been generated (automatically) current method
assertElementPositionTop() Related Assertion
assertNotElementPositionTop() Related Assertion
getElementPositionTop() Related Accessor
verifyElementPositionTop() Related Assertion
waitForElementPositionTop() Related Assertion
waitForNotElementPositionTop() Related Assertion

Definition at line 6226 of file SeleniumTestCaseDoc.php.

verifyNotElementWidth (   $locator,
  $pattern 
)

Assertion: Retrieves the width of an element.

Value to verify:

width of an element in pixels

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementWidth()).

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementWidth() Base method, from which has been generated (automatically) current method
assertElementWidth() Related Assertion
assertNotElementWidth() Related Assertion
getElementWidth() Related Accessor
verifyElementWidth() Related Assertion
waitForElementWidth() Related Assertion
waitForNotElementWidth() Related Assertion

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.

Value to verify:

the results of evaluating the snippet

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotEval()).

Parameters
string$scriptthe JavaScript snippet to run
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeEval() Base method, from which has been generated (automatically) current method
assertEval() Related Assertion
assertNotEval() Related Assertion
getEval() Related Accessor
verifyEval() Related Assertion
waitForEval() Related Assertion
waitForNotEval() Related Assertion

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.

Value to verify:

the value passed in

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotExpression()).

Parameters
string$expressionthe value to return
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeExpression() Base method, from which has been generated (automatically) current method
assertExpression() Related Assertion
assertNotExpression() Related Assertion
getExpression() Related Accessor
verifyExpression() Related Assertion
waitForExpression() Related Assertion
waitForNotExpression() Related Assertion

Definition at line 7028 of file SeleniumTestCaseDoc.php.

verifyNotHtmlSource (   $pattern)

Assertion: Returns the entire HTML source between the opening and closing "html" tags.

Value to verify:

the entire HTML source

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotHtmlSource()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeHtmlSource() Base method, from which has been generated (automatically) current method
assertHtmlSource() Related Assertion
assertNotHtmlSource() Related Assertion
getHtmlSource() Related Accessor
verifyHtmlSource() Related Assertion
waitForHtmlSource() Related Assertion
waitForNotHtmlSource() Related Assertion

Definition at line 7261 of file SeleniumTestCaseDoc.php.

verifyNotLocation (   $pattern)

Assertion: Gets the absolute URL of the current page.

Value to verify:

the absolute URL of the current page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotLocation()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeLocation() Base method, from which has been generated (automatically) current method
assertLocation() Related Assertion
assertNotLocation() Related Assertion
getLocation() Related Accessor
verifyLocation() Related Assertion
waitForLocation() Related Assertion
waitForNotLocation() Related Assertion

Definition at line 7486 of file SeleniumTestCaseDoc.php.

verifyNotMouseSpeed (   $pattern)

Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Value to verify:

the number of pixels between "mousemove" events during dragAndDrop commands (default=10)

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotMouseSpeed()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeMouseSpeed() Base method, from which has been generated (automatically) current method
assertMouseSpeed() Related Assertion
assertNotMouseSpeed() Related Assertion
getMouseSpeed() Related Accessor
verifyMouseSpeed() Related Assertion
waitForMouseSpeed() Related Assertion
waitForNotMouseSpeed() Related Assertion

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.

Value to verify:

true if element1 is the previous sibling of element2, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotOrdered()).

Parameters
string$locator1an element locator pointing to the first element (see Element Locators)
string$locator2an element locator pointing to the second element (see Element Locators)
Returns
void
See also
storeOrdered() Base method, from which has been generated (automatically) current method
assertNotOrdered() Related Assertion
assertOrdered() Related Assertion
isOrdered() Related Accessor
verifyOrdered() Related Assertion
waitForNotOrdered() Related Assertion
waitForOrdered() Related Assertion

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.

Value to verify:

the message of the most recent JavaScript question prompt

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotPrompt()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storePrompt() Base method, from which has been generated (automatically) current method
assertNotPrompt() Related Assertion
assertPrompt() Related Assertion
getPrompt() Related Accessor
verifyPrompt() Related Assertion
waitForNotPrompt() Related Assertion
waitForPrompt() Related Assertion

Definition at line 8211 of file SeleniumTestCaseDoc.php.

verifyNotSelectedId (   $selectLocator,
  $pattern 
)

Assertion: Gets option element ID for selected option in the specified select element.

Value to verify:

the selected option ID in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedId()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedId() Base method, from which has been generated (automatically) current method
assertNotSelectedId() Related Assertion
assertSelectedId() Related Assertion
getSelectedId() Related Accessor
verifySelectedId() Related Assertion
waitForNotSelectedId() Related Assertion
waitForSelectedId() Related Assertion

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.

Value to verify:

an array of all selected option IDs in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIds()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIds() Base method, from which has been generated (automatically) current method
assertNotSelectedIds() Related Assertion
assertSelectedIds() Related Assertion
getSelectedIds() Related Accessor
verifySelectedIds() Related Assertion
waitForNotSelectedIds() Related Assertion
waitForSelectedIds() Related Assertion

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.

Value to verify:

the selected option index in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIndex()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndex() Base method, from which has been generated (automatically) current method
assertNotSelectedIndex() Related Assertion
assertSelectedIndex() Related Assertion
getSelectedIndex() Related Accessor
verifySelectedIndex() Related Assertion
waitForNotSelectedIndex() Related Assertion
waitForSelectedIndex() Related Assertion

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.

Value to verify:

an array of all selected option indexes in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIndexes()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndexes() Base method, from which has been generated (automatically) current method
assertNotSelectedIndexes() Related Assertion
assertSelectedIndexes() Related Assertion
getSelectedIndexes() Related Accessor
verifySelectedIndexes() Related Assertion
waitForNotSelectedIndexes() Related Assertion
waitForSelectedIndexes() Related Assertion

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.

Value to verify:

the selected option label in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedLabel()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabel() Base method, from which has been generated (automatically) current method
assertNotSelectedLabel() Related Assertion
assertSelectedLabel() Related Assertion
getSelectedLabel() Related Accessor
verifySelectedLabel() Related Assertion
waitForNotSelectedLabel() Related Assertion
waitForSelectedLabel() Related Assertion

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.

Value to verify:

an array of all selected option labels in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedLabels()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabels() Base method, from which has been generated (automatically) current method
assertNotSelectedLabels() Related Assertion
assertSelectedLabels() Related Assertion
getSelectedLabels() Related Accessor
verifySelectedLabels() Related Assertion
waitForNotSelectedLabels() Related Assertion
waitForSelectedLabels() Related Assertion

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.

Value to verify:

the selected option value in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedValue()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValue() Base method, from which has been generated (automatically) current method
assertNotSelectedValue() Related Assertion
assertSelectedValue() Related Assertion
getSelectedValue() Related Accessor
verifySelectedValue() Related Assertion
waitForNotSelectedValue() Related Assertion
waitForSelectedValue() Related Assertion

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.

Value to verify:

an array of all selected option values in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedValues()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValues() Base method, from which has been generated (automatically) current method
assertNotSelectedValues() Related Assertion
assertSelectedValues() Related Assertion
getSelectedValues() Related Accessor
verifySelectedValues() Related Assertion
waitForNotSelectedValues() Related Assertion
waitForSelectedValues() Related Assertion

Definition at line 10433 of file SeleniumTestCaseDoc.php.

verifyNotSelectOptions (   $selectLocator,
  $pattern 
)

Assertion: Gets all option labels in the specified select drop-down.

Value to verify:

an array of all option labels in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectOptions()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectOptions() Base method, from which has been generated (automatically) current method
assertNotSelectOptions() Related Assertion
assertSelectOptions() Related Assertion
getSelectOptions() Related Accessor
verifySelectOptions() Related Assertion
waitForNotSelectOptions() Related Assertion
waitForSelectOptions() Related Assertion

Definition at line 8472 of file SeleniumTestCaseDoc.php.

verifyNotSomethingSelected (   $selectLocator)

Assertion: Determines whether some option in a drop-down menu is selected.

Value to verify:

true if some option has been selected, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSomethingSelected()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
void
See also
storeSomethingSelected() Base method, from which has been generated (automatically) current method
assertNotSomethingSelected() Related Assertion
assertSomethingSelected() Related Assertion
isSomethingSelected() Related Accessor
verifySomethingSelected() Related Assertion
waitForNotSomethingSelected() Related Assertion
waitForSomethingSelected() Related Assertion

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.

Value to verify:

the execution speed in milliseconds.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSpeed()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSpeed() Base method, from which has been generated (automatically) current method
assertNotSpeed() Related Assertion
assertSpeed() Related Assertion
getSpeed() Related Accessor
verifySpeed() Related Assertion
waitForNotSpeed() Related Assertion
waitForSpeed() Related Assertion

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.

Value to verify:

the text from the specified cell

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotTable()).

Parameters
string$tableCellAddressa cell address, e.g. "foo.1.4"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTable() Base method, from which has been generated (automatically) current method
assertNotTable() Related Assertion
assertTable() Related Assertion
getTable() Related Accessor
verifyTable() Related Assertion
waitForNotTable() Related Assertion
waitForTable() Related Assertion

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.

Value to verify:

the text of the element

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotText()).

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeText() Base method, from which has been generated (automatically) current method
assertNotText() Related Assertion
assertText() Related Assertion
getText() Related Accessor
verifyText() Related Assertion
waitForNotText() Related Assertion
waitForText() Related Assertion

Definition at line 11421 of file SeleniumTestCaseDoc.php.

verifyNotTitle (   $pattern)

Assertion: Gets the title of the current page.

Value to verify:

the title of the current page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotTitle()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTitle() Base method, from which has been generated (automatically) current method
assertNotTitle() Related Assertion
assertTitle() Related Assertion
getTitle() Related Accessor
verifyTitle() Related Assertion
waitForNotTitle() Related Assertion
waitForTitle() Related Assertion

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.

Value to verify:

the element value, or "on/off" for checkbox/radio elements

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotValue()).

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeValue() Base method, from which has been generated (automatically) current method
assertNotValue() Related Assertion
assertValue() Related Assertion
getValue() Related Accessor
verifyValue() Related Assertion
waitForNotValue() Related Assertion
waitForValue() Related Assertion

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.

Value to verify:

true if the specified element is visible, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotVisible()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeVisible() Base method, from which has been generated (automatically) current method
assertNotVisible() Related Assertion
assertVisible() Related Assertion
isVisible() Related Accessor
verifyVisible() Related Assertion
waitForNotVisible() Related Assertion
waitForVisible() Related Assertion

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.

Value to verify:

true if the new frame is this code's window

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotWhetherThisFrameMatchFrameExpression()).

Parameters
string$currentFrameStringstarting frame
string$targetnew frame (which might be relative to the current one)
Returns
void
See also
storeWhetherThisFrameMatchFrameExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisFrameMatchFrameExpression() Related Assertion
assertWhetherThisFrameMatchFrameExpression() Related Assertion
getWhetherThisFrameMatchFrameExpression() Related Accessor
verifyWhetherThisFrameMatchFrameExpression() Related Assertion
waitForNotWhetherThisFrameMatchFrameExpression() Related Assertion
waitForWhetherThisFrameMatchFrameExpression() Related Assertion

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.

Value to verify:

true if the new window is this code's window

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotWhetherThisWindowMatchWindowExpression()).

Parameters
string$currentWindowStringstarting window
string$targetnew window (which might be relative to the current one, e.g., "_parent")
Returns
void
See also
storeWhetherThisWindowMatchWindowExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisWindowMatchWindowExpression() Related Assertion
assertWhetherThisWindowMatchWindowExpression() Related Assertion
getWhetherThisWindowMatchWindowExpression() Related Accessor
verifyWhetherThisWindowMatchWindowExpression() Related Assertion
waitForNotWhetherThisWindowMatchWindowExpression() Related Assertion
waitForWhetherThisWindowMatchWindowExpression() Related Assertion

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.

Value to verify:

the number of nodes that match the specified xpath

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotXpathCount()).

Parameters
string$xpaththe xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeXpathCount() Base method, from which has been generated (automatically) current method
assertNotXpathCount() Related Assertion
assertXpathCount() Related Assertion
getXpathCount() Related Accessor
verifyXpathCount() Related Assertion
waitForNotXpathCount() Related Assertion
waitForXpathCount() Related Assertion

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.

Value to verify:

true if element1 is the previous sibling of element2, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertOrdered()).

Parameters
string$locator1an element locator pointing to the first element (see Element Locators)
string$locator2an element locator pointing to the second element (see Element Locators)
Returns
void
See also
storeOrdered() Base method, from which has been generated (automatically) current method
assertNotOrdered() Related Assertion
assertOrdered() Related Assertion
isOrdered() Related Accessor
verifyNotOrdered() Related Assertion
waitForNotOrdered() Related Assertion
waitForOrdered() Related Assertion

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.

Value to verify:

the message of the most recent JavaScript question prompt

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertPrompt()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storePrompt() Base method, from which has been generated (automatically) current method
assertNotPrompt() Related Assertion
assertPrompt() Related Assertion
getPrompt() Related Accessor
verifyNotPrompt() Related Assertion
waitForNotPrompt() Related Assertion
waitForPrompt() Related Assertion

Definition at line 8249 of file SeleniumTestCaseDoc.php.

verifyPromptNotPresent ( )

Assertion: Has a prompt occurred?

This function never throws an exception .

Value to verify:

true if there is a pending prompt

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertPromptNotPresent()).

Returns
void
See also
storePromptPresent() Base method, from which has been generated (automatically) current method
assertPromptNotPresent() Related Assertion
assertPromptPresent() Related Assertion
isPromptPresent() Related Accessor
verifyPromptPresent() Related Assertion
waitForPromptNotPresent() Related Assertion
waitForPromptPresent() Related Assertion

Definition at line 13211 of file SeleniumTestCaseDoc.php.

verifyPromptPresent ( )

Assertion: Has a prompt occurred?

This function never throws an exception .

Value to verify:

true if there is a pending prompt

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertPromptPresent()).

Returns
void
See also
storePromptPresent() Base method, from which has been generated (automatically) current method
assertPromptNotPresent() Related Assertion
assertPromptPresent() Related Assertion
isPromptPresent() Related Accessor
verifyPromptNotPresent() Related Assertion
waitForPromptNotPresent() Related Assertion
waitForPromptPresent() Related Assertion

Definition at line 13240 of file SeleniumTestCaseDoc.php.

verifySelectedId (   $selectLocator,
  $pattern 
)

Assertion: Gets option element ID for selected option in the specified select element.

Value to verify:

the selected option ID in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedId()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedId() Base method, from which has been generated (automatically) current method
assertNotSelectedId() Related Assertion
assertSelectedId() Related Assertion
getSelectedId() Related Accessor
verifyNotSelectedId() Related Assertion
waitForNotSelectedId() Related Assertion
waitForSelectedId() Related Assertion

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.

Value to verify:

an array of all selected option IDs in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIds()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIds() Base method, from which has been generated (automatically) current method
assertNotSelectedIds() Related Assertion
assertSelectedIds() Related Assertion
getSelectedIds() Related Accessor
verifyNotSelectedIds() Related Assertion
waitForNotSelectedIds() Related Assertion
waitForSelectedIds() Related Assertion

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.

Value to verify:

the selected option index in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIndex()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndex() Base method, from which has been generated (automatically) current method
assertNotSelectedIndex() Related Assertion
assertSelectedIndex() Related Assertion
getSelectedIndex() Related Accessor
verifyNotSelectedIndex() Related Assertion
waitForNotSelectedIndex() Related Assertion
waitForSelectedIndex() Related Assertion

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.

Value to verify:

an array of all selected option indexes in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIndexes()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndexes() Base method, from which has been generated (automatically) current method
assertNotSelectedIndexes() Related Assertion
assertSelectedIndexes() Related Assertion
getSelectedIndexes() Related Accessor
verifyNotSelectedIndexes() Related Assertion
waitForNotSelectedIndexes() Related Assertion
waitForSelectedIndexes() Related Assertion

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.

Value to verify:

the selected option label in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedLabel()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabel() Base method, from which has been generated (automatically) current method
assertNotSelectedLabel() Related Assertion
assertSelectedLabel() Related Assertion
getSelectedLabel() Related Accessor
verifyNotSelectedLabel() Related Assertion
waitForNotSelectedLabel() Related Assertion
waitForSelectedLabel() Related Assertion

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.

Value to verify:

an array of all selected option labels in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedLabels()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabels() Base method, from which has been generated (automatically) current method
assertNotSelectedLabels() Related Assertion
assertSelectedLabels() Related Assertion
getSelectedLabels() Related Accessor
verifyNotSelectedLabels() Related Assertion
waitForNotSelectedLabels() Related Assertion
waitForSelectedLabels() Related Assertion

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.

Value to verify:

the selected option value in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedValue()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValue() Base method, from which has been generated (automatically) current method
assertNotSelectedValue() Related Assertion
assertSelectedValue() Related Assertion
getSelectedValue() Related Accessor
verifyNotSelectedValue() Related Assertion
waitForNotSelectedValue() Related Assertion
waitForSelectedValue() Related Assertion

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.

Value to verify:

an array of all selected option values in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedValues()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValues() Base method, from which has been generated (automatically) current method
assertNotSelectedValues() Related Assertion
assertSelectedValues() Related Assertion
getSelectedValues() Related Accessor
verifyNotSelectedValues() Related Assertion
waitForNotSelectedValues() Related Assertion
waitForSelectedValues() Related Assertion

Definition at line 10466 of file SeleniumTestCaseDoc.php.

verifySelectOptions (   $selectLocator,
  $pattern 
)

Assertion: Gets all option labels in the specified select drop-down.

Value to verify:

an array of all option labels in the specified select drop-down

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectOptions()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectOptions() Base method, from which has been generated (automatically) current method
assertNotSelectOptions() Related Assertion
assertSelectOptions() Related Assertion
getSelectOptions() Related Accessor
verifyNotSelectOptions() Related Assertion
waitForNotSelectOptions() Related Assertion
waitForSelectOptions() Related Assertion

Definition at line 8504 of file SeleniumTestCaseDoc.php.

verifySomethingSelected (   $selectLocator)

Assertion: Determines whether some option in a drop-down menu is selected.

Value to verify:

true if some option has been selected, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSomethingSelected()).

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
void
See also
storeSomethingSelected() Base method, from which has been generated (automatically) current method
assertNotSomethingSelected() Related Assertion
assertSomethingSelected() Related Assertion
isSomethingSelected() Related Accessor
verifyNotSomethingSelected() Related Assertion
waitForNotSomethingSelected() Related Assertion
waitForSomethingSelected() Related Assertion

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.

Value to verify:

the execution speed in milliseconds.

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertSpeed()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSpeed() Base method, from which has been generated (automatically) current method
assertNotSpeed() Related Assertion
assertSpeed() Related Assertion
getSpeed() Related Accessor
verifyNotSpeed() Related Assertion
waitForNotSpeed() Related Assertion
waitForSpeed() Related Assertion

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.

Value to verify:

the text from the specified cell

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertTable()).

Parameters
string$tableCellAddressa cell address, e.g. "foo.1.4"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTable() Base method, from which has been generated (automatically) current method
assertNotTable() Related Assertion
assertTable() Related Assertion
getTable() Related Accessor
verifyNotTable() Related Assertion
waitForNotTable() Related Assertion
waitForTable() Related Assertion

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.

Value to verify:

the text of the element

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertText()).

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeText() Base method, from which has been generated (automatically) current method
assertNotText() Related Assertion
assertText() Related Assertion
getText() Related Accessor
verifyNotText() Related Assertion
waitForNotText() Related Assertion
waitForText() Related Assertion

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.

Value to verify:

true if the pattern matches the text, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertTextNotPresent()).

Parameters
string$patterna pattern to match with the text of the page (see String match Patterns)
Returns
void
See also
storeTextPresent() Base method, from which has been generated (automatically) current method
assertTextNotPresent() Related Assertion
assertTextPresent() Related Assertion
isTextPresent() Related Accessor
verifyTextPresent() Related Assertion
waitForTextNotPresent() Related Assertion
waitForTextPresent() Related Assertion

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.

Value to verify:

true if the pattern matches the text, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertTextPresent()).

Parameters
string$patterna pattern to match with the text of the page (see String match Patterns)
Returns
void
See also
storeTextPresent() Base method, from which has been generated (automatically) current method
assertTextNotPresent() Related Assertion
assertTextPresent() Related Assertion
isTextPresent() Related Accessor
verifyTextNotPresent() Related Assertion
waitForTextNotPresent() Related Assertion
waitForTextPresent() Related Assertion

Definition at line 13469 of file SeleniumTestCaseDoc.php.

verifyTitle (   $pattern)

Assertion: Gets the title of the current page.

Value to verify:

the title of the current page

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertTitle()).

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTitle() Base method, from which has been generated (automatically) current method
assertNotTitle() Related Assertion
assertTitle() Related Assertion
getTitle() Related Accessor
verifyNotTitle() Related Assertion
waitForNotTitle() Related Assertion
waitForTitle() Related Assertion

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.

Value to verify:

the element value, or "on/off" for checkbox/radio elements

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertValue()).

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeValue() Base method, from which has been generated (automatically) current method
assertNotValue() Related Assertion
assertValue() Related Assertion
getValue() Related Accessor
verifyNotValue() Related Assertion
waitForNotValue() Related Assertion
waitForValue() Related Assertion

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.

Value to verify:

true if the specified element is visible, false otherwise

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertVisible()).

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeVisible() Base method, from which has been generated (automatically) current method
assertNotVisible() Related Assertion
assertVisible() Related Assertion
isVisible() Related Accessor
verifyNotVisible() Related Assertion
waitForNotVisible() Related Assertion
waitForVisible() Related Assertion

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.

Value to verify:

true if the new frame is this code's window

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertWhetherThisFrameMatchFrameExpression()).

Parameters
string$currentFrameStringstarting frame
string$targetnew frame (which might be relative to the current one)
Returns
void
See also
storeWhetherThisFrameMatchFrameExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisFrameMatchFrameExpression() Related Assertion
assertWhetherThisFrameMatchFrameExpression() Related Assertion
getWhetherThisFrameMatchFrameExpression() Related Accessor
verifyNotWhetherThisFrameMatchFrameExpression() Related Assertion
waitForNotWhetherThisFrameMatchFrameExpression() Related Assertion
waitForWhetherThisFrameMatchFrameExpression() Related Assertion

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.

Value to verify:

true if the new window is this code's window

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertWhetherThisWindowMatchWindowExpression()).

Parameters
string$currentWindowStringstarting window
string$targetnew window (which might be relative to the current one, e.g., "_parent")
Returns
void
See also
storeWhetherThisWindowMatchWindowExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisWindowMatchWindowExpression() Related Assertion
assertWhetherThisWindowMatchWindowExpression() Related Assertion
getWhetherThisWindowMatchWindowExpression() Related Accessor
verifyNotWhetherThisWindowMatchWindowExpression() Related Assertion
waitForNotWhetherThisWindowMatchWindowExpression() Related Assertion
waitForWhetherThisWindowMatchWindowExpression() Related Assertion

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.

Value to verify:

the number of nodes that match the specified xpath

Notes:

If assertion will fail the test, it will continue to run the test case (in contrast to the assertXpathCount()).

Parameters
string$xpaththe xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeXpathCount() Base method, from which has been generated (automatically) current method
assertNotXpathCount() Related Assertion
assertXpathCount() Related Assertion
getXpathCount() Related Accessor
verifyNotXpathCount() Related Assertion
waitForNotXpathCount() Related Assertion
waitForXpathCount() Related Assertion

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.

Expected value/condition:

The message of the most recent JavaScript alert

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAlert() Base method, from which has been generated (automatically) current method
assertAlert() Related Assertion
assertNotAlert() Related Assertion
getAlert() Related Accessor
verifyAlert() Related Assertion
verifyNotAlert() Related Assertion
waitForNotAlert() Related Assertion

Definition at line 672 of file SeleniumTestCaseDoc.php.

waitForAlertNotPresent ( )

Assertion: Has an alert occurred?

This function never throws an exception .

Expected value/condition:

true if there is an alert

Notes:

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.

Returns
void
See also
storeAlertPresent() Base method, from which has been generated (automatically) current method
assertAlertNotPresent() Related Assertion
assertAlertPresent() Related Assertion
isAlertPresent() Related Accessor
verifyAlertNotPresent() Related Assertion
verifyAlertPresent() Related Assertion
waitForAlertPresent() Related Assertion

Definition at line 905 of file SeleniumTestCaseDoc.php.

waitForAlertPresent ( )

Assertion: Has an alert occurred?

This function never throws an exception .

Expected value/condition:

true if there is an alert

Notes:

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.

Returns
void
See also
storeAlertPresent() Base method, from which has been generated (automatically) current method
assertAlertNotPresent() Related Assertion
assertAlertPresent() Related Assertion
isAlertPresent() Related Accessor
verifyAlertNotPresent() Related Assertion
verifyAlertPresent() Related Assertion
waitForAlertNotPresent() Related Assertion

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.

Expected value/condition:

the IDs of all buttons on the page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllButtons() Base method, from which has been generated (automatically) current method
assertAllButtons() Related Assertion
assertNotAllButtons() Related Assertion
getAllButtons() Related Accessor
verifyAllButtons() Related Assertion
verifyNotAllButtons() Related Assertion
waitForNotAllButtons() Related Assertion

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.

Expected value/condition:

the IDs of all field on the page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllFields() Base method, from which has been generated (automatically) current method
assertAllFields() Related Assertion
assertNotAllFields() Related Assertion
getAllFields() Related Accessor
verifyAllFields() Related Assertion
verifyNotAllFields() Related Assertion
waitForNotAllFields() Related Assertion

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.

Expected value/condition:

the IDs of all links on the page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllLinks() Base method, from which has been generated (automatically) current method
assertAllLinks() Related Assertion
assertNotAllLinks() Related Assertion
getAllLinks() Related Accessor
verifyAllLinks() Related Assertion
verifyNotAllLinks() Related Assertion
waitForNotAllLinks() Related Assertion

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.

Expected value/condition:

Array of identifiers of all windows that the browser knows about.

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowIds() Base method, from which has been generated (automatically) current method
assertAllWindowIds() Related Assertion
assertNotAllWindowIds() Related Assertion
getAllWindowIds() Related Accessor
verifyAllWindowIds() Related Assertion
verifyNotAllWindowIds() Related Assertion
waitForNotAllWindowIds() Related Assertion

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.

Expected value/condition:

Array of names of all windows that the browser knows about.

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowNames() Base method, from which has been generated (automatically) current method
assertAllWindowNames() Related Assertion
assertNotAllWindowNames() Related Assertion
getAllWindowNames() Related Accessor
verifyAllWindowNames() Related Assertion
verifyNotAllWindowNames() Related Assertion
waitForNotAllWindowNames() Related Assertion

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.

Expected value/condition:

Array of titles of all windows that the browser knows about.

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowTitles() Base method, from which has been generated (automatically) current method
assertAllWindowTitles() Related Assertion
assertNotAllWindowTitles() Related Assertion
getAllWindowTitles() Related Accessor
verifyAllWindowTitles() Related Assertion
verifyNotAllWindowTitles() Related Assertion
waitForNotAllWindowTitles() Related Assertion

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

Expected value/condition:

the value of the specified attribute

Notes:

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.

Parameters
string$attributeLocatoran element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttribute() Base method, from which has been generated (automatically) current method
assertAttribute() Related Assertion
assertNotAttribute() Related Assertion
getAttribute() Related Accessor
verifyAttribute() Related Assertion
verifyNotAttribute() Related Assertion
waitForNotAttribute() Related Assertion

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.

Expected value/condition:

the set of values of this attribute from all known windows.

Notes:

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.

Parameters
string$attributeNamename of an attribute on the windows
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttributeFromAllWindows() Base method, from which has been generated (automatically) current method
assertAttributeFromAllWindows() Related Assertion
assertNotAttributeFromAllWindows() Related Assertion
getAttributeFromAllWindows() Related Accessor
verifyAttributeFromAllWindows() Related Assertion
verifyNotAttributeFromAllWindows() Related Assertion
waitForNotAttributeFromAllWindows() Related Assertion

Definition at line 2803 of file SeleniumTestCaseDoc.php.

waitForBodyText (   $pattern)

Assertion: Gets the entire text of the page.

Expected value/condition:

the entire text of the page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeBodyText() Base method, from which has been generated (automatically) current method
assertBodyText() Related Assertion
assertNotBodyText() Related Assertion
getBodyText() Related Accessor
verifyBodyText() Related Assertion
verifyNotBodyText() Related Assertion
waitForNotBodyText() Related Assertion

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.

Expected value/condition:

true if the checkbox is checked, false otherwise

Notes:

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.

Parameters
string$locatoran element locator pointing to a checkbox or radio button (see Element Locators)
Returns
void
See also
storeChecked() Base method, from which has been generated (automatically) current method
assertChecked() Related Assertion
assertNotChecked() Related Assertion
isChecked() Related Accessor
verifyChecked() Related Assertion
verifyNotChecked() Related Assertion
waitForNotChecked() Related Assertion

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.

Parameters
string$scriptthe JavaScript snippet to run
string$timeouta timeout in milliseconds, after which this command will return with an error
Returns
void

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.

Expected value/condition:

the message of the most recent JavaScript confirmation dialog

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeConfirmation() Base method, from which has been generated (automatically) current method
assertConfirmation() Related Assertion
assertNotConfirmation() Related Assertion
getConfirmation() Related Accessor
verifyConfirmation() Related Assertion
verifyNotConfirmation() Related Assertion
waitForNotConfirmation() Related Assertion

Definition at line 3586 of file SeleniumTestCaseDoc.php.

waitForConfirmationNotPresent ( )

Assertion: Has confirm() been called?

This function never throws an exception .

Expected value/condition:

true if there is a pending confirmation

Notes:

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.

Returns
void
See also
storeConfirmationPresent() Base method, from which has been generated (automatically) current method
assertConfirmationNotPresent() Related Assertion
assertConfirmationPresent() Related Assertion
isConfirmationPresent() Related Accessor
verifyConfirmationNotPresent() Related Assertion
verifyConfirmationPresent() Related Assertion
waitForConfirmationPresent() Related Assertion

Definition at line 3822 of file SeleniumTestCaseDoc.php.

waitForConfirmationPresent ( )

Assertion: Has confirm() been called?

This function never throws an exception .

Expected value/condition:

true if there is a pending confirmation

Notes:

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.

Returns
void
See also
storeConfirmationPresent() Base method, from which has been generated (automatically) current method
assertConfirmationNotPresent() Related Assertion
assertConfirmationPresent() Related Assertion
isConfirmationPresent() Related Accessor
verifyConfirmationNotPresent() Related Assertion
verifyConfirmationPresent() Related Assertion
waitForConfirmationNotPresent() Related Assertion

Definition at line 3852 of file SeleniumTestCaseDoc.php.

waitForCookie (   $pattern)

Assertion: Return all cookies of the current page under test.

Expected value/condition:

all cookies of the current page under test

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookie() Base method, from which has been generated (automatically) current method
assertCookie() Related Assertion
assertNotCookie() Related Assertion
getCookie() Related Accessor
verifyCookie() Related Assertion
verifyNotCookie() Related Assertion
waitForNotCookie() Related Assertion

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.

Expected value/condition:

the value of the cookie

Notes:

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.

Parameters
string$namethe name of the cookie
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookieByName() Base method, from which has been generated (automatically) current method
assertCookieByName() Related Assertion
assertNotCookieByName() Related Assertion
getCookieByName() Related Accessor
verifyCookieByName() Related Assertion
verifyNotCookieByName() Related Assertion
waitForNotCookieByName() Related Assertion

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.

Expected value/condition:

true if a cookie with the specified name is present, or false otherwise.

Notes:

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.

Parameters
string$namethe name of the cookie
Returns
void
See also
storeCookiePresent() Base method, from which has been generated (automatically) current method
assertCookieNotPresent() Related Assertion
assertCookiePresent() Related Assertion
isCookiePresent() Related Accessor
verifyCookieNotPresent() Related Assertion
verifyCookiePresent() Related Assertion
waitForCookiePresent() Related Assertion

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.

Expected value/condition:

true if a cookie with the specified name is present, or false otherwise.

Notes:

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.

Parameters
string$namethe name of the cookie
Returns
void
See also
storeCookiePresent() Base method, from which has been generated (automatically) current method
assertCookieNotPresent() Related Assertion
assertCookiePresent() Related Assertion
isCookiePresent() Related Accessor
verifyCookieNotPresent() Related Assertion
verifyCookiePresent() Related Assertion
waitForCookieNotPresent() Related Assertion

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.

Expected value/condition:

the numerical position of the cursor in the field

Notes:

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.

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCursorPosition() Base method, from which has been generated (automatically) current method
assertCursorPosition() Related Assertion
assertNotCursorPosition() Related Assertion
getCursorPosition() Related Accessor
verifyCursorPosition() Related Assertion
verifyNotCursorPosition() Related Assertion
waitForNotCursorPosition() Related Assertion

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.

Expected value/condition:

true if the input element is editable, false otherwise

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeEditable() Base method, from which has been generated (automatically) current method
assertEditable() Related Assertion
assertNotEditable() Related Assertion
isEditable() Related Accessor
verifyEditable() Related Assertion
verifyNotEditable() Related Assertion
waitForNotEditable() Related Assertion

Definition at line 5044 of file SeleniumTestCaseDoc.php.

waitForElementHeight (   $locator,
  $pattern 
)

Assertion: Retrieves the height of an element.

Expected value/condition:

height of an element in pixels

Notes:

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.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementHeight() Base method, from which has been generated (automatically) current method
assertElementHeight() Related Assertion
assertNotElementHeight() Related Assertion
getElementHeight() Related Accessor
verifyElementHeight() Related Assertion
verifyNotElementHeight() Related Assertion
waitForNotElementHeight() Related Assertion

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.

Expected value/condition:

of relative index of the element to its parent (starting from 0)

Notes:

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.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementIndex() Base method, from which has been generated (automatically) current method
assertElementIndex() Related Assertion
assertNotElementIndex() Related Assertion
getElementIndex() Related Accessor
verifyElementIndex() Related Assertion
verifyNotElementIndex() Related Assertion
waitForNotElementIndex() Related Assertion

Definition at line 5543 of file SeleniumTestCaseDoc.php.

waitForElementNotPresent (   $locator)

Assertion: Verifies that the specified element is somewhere on the page.

Expected value/condition:

true if the element is present, false otherwise

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeElementPresent() Base method, from which has been generated (automatically) current method
assertElementNotPresent() Related Assertion
assertElementPresent() Related Assertion
isElementPresent() Related Accessor
verifyElementNotPresent() Related Assertion
verifyElementPresent() Related Assertion
waitForElementPresent() Related Assertion

Definition at line 5777 of file SeleniumTestCaseDoc.php.

waitForElementPositionLeft (   $locator,
  $pattern 
)

Assertion: Retrieves the horizontal position of an element.

Expected value/condition:

of pixels from the edge of the frame.

Notes:

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.

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionLeft() Base method, from which has been generated (automatically) current method
assertElementPositionLeft() Related Assertion
assertNotElementPositionLeft() Related Assertion
getElementPositionLeft() Related Accessor
verifyElementPositionLeft() Related Assertion
verifyNotElementPositionLeft() Related Assertion
waitForNotElementPositionLeft() Related Assertion

Definition at line 6017 of file SeleniumTestCaseDoc.php.

waitForElementPositionTop (   $locator,
  $pattern 
)

Assertion: Retrieves the vertical position of an element.

Expected value/condition:

of pixels from the edge of the frame.

Notes:

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.

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionTop() Base method, from which has been generated (automatically) current method
assertElementPositionTop() Related Assertion
assertNotElementPositionTop() Related Assertion
getElementPositionTop() Related Accessor
verifyElementPositionTop() Related Assertion
verifyNotElementPositionTop() Related Assertion
waitForNotElementPositionTop() Related Assertion

Definition at line 6259 of file SeleniumTestCaseDoc.php.

waitForElementPresent (   $locator)

Assertion: Verifies that the specified element is somewhere on the page.

Expected value/condition:

true if the element is present, false otherwise

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeElementPresent() Base method, from which has been generated (automatically) current method
assertElementNotPresent() Related Assertion
assertElementPresent() Related Assertion
isElementPresent() Related Accessor
verifyElementNotPresent() Related Assertion
verifyElementPresent() Related Assertion
waitForElementNotPresent() Related Assertion

Definition at line 5808 of file SeleniumTestCaseDoc.php.

waitForElementWidth (   $locator,
  $pattern 
)

Assertion: Retrieves the width of an element.

Expected value/condition:

width of an element in pixels

Notes:

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.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementWidth() Base method, from which has been generated (automatically) current method
assertElementWidth() Related Assertion
assertNotElementWidth() Related Assertion
getElementWidth() Related Accessor
verifyElementWidth() Related Assertion
verifyNotElementWidth() Related Assertion
waitForNotElementWidth() Related Assertion

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.

Expected value/condition:

the results of evaluating the snippet

Notes:

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.

Parameters
string$scriptthe JavaScript snippet to run
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeEval() Base method, from which has been generated (automatically) current method
assertEval() Related Assertion
assertNotEval() Related Assertion
getEval() Related Accessor
verifyEval() Related Assertion
verifyNotEval() Related Assertion
waitForNotEval() Related Assertion

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.

Expected value/condition:

the value passed in

Notes:

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.

Parameters
string$expressionthe value to return
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeExpression() Base method, from which has been generated (automatically) current method
assertExpression() Related Assertion
assertNotExpression() Related Assertion
getExpression() Related Accessor
verifyExpression() Related Assertion
verifyNotExpression() Related Assertion
waitForNotExpression() Related Assertion

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.

Parameters
string$frameAddressFrameAddress from the server side
string$timeouta timeout in milliseconds, after which this command will return with an error
Returns
void

Definition at line 16342 of file SeleniumTestCaseDoc.php.

waitForHtmlSource (   $pattern)

Assertion: Returns the entire HTML source between the opening and closing "html" tags.

Expected value/condition:

the entire HTML source

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeHtmlSource() Base method, from which has been generated (automatically) current method
assertHtmlSource() Related Assertion
assertNotHtmlSource() Related Assertion
getHtmlSource() Related Accessor
verifyHtmlSource() Related Assertion
verifyNotHtmlSource() Related Assertion
waitForNotHtmlSource() Related Assertion

Definition at line 7292 of file SeleniumTestCaseDoc.php.

waitForLocation (   $pattern)

Assertion: Gets the absolute URL of the current page.

Expected value/condition:

the absolute URL of the current page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeLocation() Base method, from which has been generated (automatically) current method
assertLocation() Related Assertion
assertNotLocation() Related Assertion
getLocation() Related Accessor
verifyLocation() Related Assertion
verifyNotLocation() Related Assertion
waitForNotLocation() Related Assertion

Definition at line 7517 of file SeleniumTestCaseDoc.php.

waitForMouseSpeed (   $pattern)

Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Expected value/condition:

the number of pixels between "mousemove" events during dragAndDrop commands (default=10)

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeMouseSpeed() Base method, from which has been generated (automatically) current method
assertMouseSpeed() Related Assertion
assertNotMouseSpeed() Related Assertion
getMouseSpeed() Related Accessor
verifyMouseSpeed() Related Assertion
verifyNotMouseSpeed() Related Assertion
waitForNotMouseSpeed() Related Assertion

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.

Expected value/condition:

The message of the most recent JavaScript alert

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAlert() Base method, from which has been generated (automatically) current method
assertAlert() Related Assertion
assertNotAlert() Related Assertion
getAlert() Related Accessor
verifyAlert() Related Assertion
verifyNotAlert() Related Assertion
waitForAlert() Related Assertion

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.

Expected value/condition:

the IDs of all buttons on the page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllButtons() Base method, from which has been generated (automatically) current method
assertAllButtons() Related Assertion
assertNotAllButtons() Related Assertion
getAllButtons() Related Accessor
verifyAllButtons() Related Assertion
verifyNotAllButtons() Related Assertion
waitForAllButtons() Related Assertion

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.

Expected value/condition:

the IDs of all field on the page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllFields() Base method, from which has been generated (automatically) current method
assertAllFields() Related Assertion
assertNotAllFields() Related Assertion
getAllFields() Related Accessor
verifyAllFields() Related Assertion
verifyNotAllFields() Related Assertion
waitForAllFields() Related Assertion

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.

Expected value/condition:

the IDs of all links on the page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllLinks() Base method, from which has been generated (automatically) current method
assertAllLinks() Related Assertion
assertNotAllLinks() Related Assertion
getAllLinks() Related Accessor
verifyAllLinks() Related Assertion
verifyNotAllLinks() Related Assertion
waitForAllLinks() Related Assertion

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.

Expected value/condition:

Array of identifiers of all windows that the browser knows about.

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowIds() Base method, from which has been generated (automatically) current method
assertAllWindowIds() Related Assertion
assertNotAllWindowIds() Related Assertion
getAllWindowIds() Related Accessor
verifyAllWindowIds() Related Assertion
verifyNotAllWindowIds() Related Assertion
waitForAllWindowIds() Related Assertion

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.

Expected value/condition:

Array of names of all windows that the browser knows about.

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowNames() Base method, from which has been generated (automatically) current method
assertAllWindowNames() Related Assertion
assertNotAllWindowNames() Related Assertion
getAllWindowNames() Related Accessor
verifyAllWindowNames() Related Assertion
verifyNotAllWindowNames() Related Assertion
waitForAllWindowNames() Related Assertion

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.

Expected value/condition:

Array of titles of all windows that the browser knows about.

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAllWindowTitles() Base method, from which has been generated (automatically) current method
assertAllWindowTitles() Related Assertion
assertNotAllWindowTitles() Related Assertion
getAllWindowTitles() Related Accessor
verifyAllWindowTitles() Related Assertion
verifyNotAllWindowTitles() Related Assertion
waitForAllWindowTitles() Related Assertion

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

Expected value/condition:

the value of the specified attribute

Notes:

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.

Parameters
string$attributeLocatoran element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttribute() Base method, from which has been generated (automatically) current method
assertAttribute() Related Assertion
assertNotAttribute() Related Assertion
getAttribute() Related Accessor
verifyAttribute() Related Assertion
verifyNotAttribute() Related Assertion
waitForAttribute() Related Assertion

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.

Expected value/condition:

the set of values of this attribute from all known windows.

Notes:

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.

Parameters
string$attributeNamename of an attribute on the windows
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeAttributeFromAllWindows() Base method, from which has been generated (automatically) current method
assertAttributeFromAllWindows() Related Assertion
assertNotAttributeFromAllWindows() Related Assertion
getAttributeFromAllWindows() Related Accessor
verifyAttributeFromAllWindows() Related Assertion
verifyNotAttributeFromAllWindows() Related Assertion
waitForAttributeFromAllWindows() Related Assertion

Definition at line 2836 of file SeleniumTestCaseDoc.php.

waitForNotBodyText (   $pattern)

Assertion: Gets the entire text of the page.

Expected value/condition:

the entire text of the page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeBodyText() Base method, from which has been generated (automatically) current method
assertBodyText() Related Assertion
assertNotBodyText() Related Assertion
getBodyText() Related Accessor
verifyBodyText() Related Assertion
verifyNotBodyText() Related Assertion
waitForBodyText() Related Assertion

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.

Expected value/condition:

true if the checkbox is checked, false otherwise

Notes:

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.

Parameters
string$locatoran element locator pointing to a checkbox or radio button (see Element Locators)
Returns
void
See also
storeChecked() Base method, from which has been generated (automatically) current method
assertChecked() Related Assertion
assertNotChecked() Related Assertion
isChecked() Related Accessor
verifyChecked() Related Assertion
verifyNotChecked() Related Assertion
waitForChecked() Related Assertion

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.

Expected value/condition:

the message of the most recent JavaScript confirmation dialog

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeConfirmation() Base method, from which has been generated (automatically) current method
assertConfirmation() Related Assertion
assertNotConfirmation() Related Assertion
getConfirmation() Related Accessor
verifyConfirmation() Related Assertion
verifyNotConfirmation() Related Assertion
waitForConfirmation() Related Assertion

Definition at line 3629 of file SeleniumTestCaseDoc.php.

waitForNotCookie (   $pattern)

Assertion: Return all cookies of the current page under test.

Expected value/condition:

all cookies of the current page under test

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookie() Base method, from which has been generated (automatically) current method
assertCookie() Related Assertion
assertNotCookie() Related Assertion
getCookie() Related Accessor
verifyCookie() Related Assertion
verifyNotCookie() Related Assertion
waitForCookie() Related Assertion

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.

Expected value/condition:

the value of the cookie

Notes:

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.

Parameters
string$namethe name of the cookie
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCookieByName() Base method, from which has been generated (automatically) current method
assertCookieByName() Related Assertion
assertNotCookieByName() Related Assertion
getCookieByName() Related Accessor
verifyCookieByName() Related Assertion
verifyNotCookieByName() Related Assertion
waitForCookieByName() Related Assertion

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.

Expected value/condition:

the numerical position of the cursor in the field

Notes:

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.

Parameters
string$locatoran element locator pointing to an input element or textarea (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeCursorPosition() Base method, from which has been generated (automatically) current method
assertCursorPosition() Related Assertion
assertNotCursorPosition() Related Assertion
getCursorPosition() Related Accessor
verifyCursorPosition() Related Assertion
verifyNotCursorPosition() Related Assertion
waitForCursorPosition() Related Assertion

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.

Expected value/condition:

true if the input element is editable, false otherwise

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeEditable() Base method, from which has been generated (automatically) current method
assertEditable() Related Assertion
assertNotEditable() Related Assertion
isEditable() Related Accessor
verifyEditable() Related Assertion
verifyNotEditable() Related Assertion
waitForEditable() Related Assertion

Definition at line 5077 of file SeleniumTestCaseDoc.php.

waitForNotElementHeight (   $locator,
  $pattern 
)

Assertion: Retrieves the height of an element.

Expected value/condition:

height of an element in pixels

Notes:

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.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementHeight() Base method, from which has been generated (automatically) current method
assertElementHeight() Related Assertion
assertNotElementHeight() Related Assertion
getElementHeight() Related Accessor
verifyElementHeight() Related Assertion
verifyNotElementHeight() Related Assertion
waitForElementHeight() Related Assertion

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.

Expected value/condition:

of relative index of the element to its parent (starting from 0)

Notes:

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.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementIndex() Base method, from which has been generated (automatically) current method
assertElementIndex() Related Assertion
assertNotElementIndex() Related Assertion
getElementIndex() Related Accessor
verifyElementIndex() Related Assertion
verifyNotElementIndex() Related Assertion
waitForElementIndex() Related Assertion

Definition at line 5578 of file SeleniumTestCaseDoc.php.

waitForNotElementPositionLeft (   $locator,
  $pattern 
)

Assertion: Retrieves the horizontal position of an element.

Expected value/condition:

of pixels from the edge of the frame.

Notes:

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.

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionLeft() Base method, from which has been generated (automatically) current method
assertElementPositionLeft() Related Assertion
assertNotElementPositionLeft() Related Assertion
getElementPositionLeft() Related Accessor
verifyElementPositionLeft() Related Assertion
verifyNotElementPositionLeft() Related Assertion
waitForElementPositionLeft() Related Assertion

Definition at line 6050 of file SeleniumTestCaseDoc.php.

waitForNotElementPositionTop (   $locator,
  $pattern 
)

Assertion: Retrieves the vertical position of an element.

Expected value/condition:

of pixels from the edge of the frame.

Notes:

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.

Parameters
string$locatoran element locator pointing to an element OR an element itself (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementPositionTop() Base method, from which has been generated (automatically) current method
assertElementPositionTop() Related Assertion
assertNotElementPositionTop() Related Assertion
getElementPositionTop() Related Accessor
verifyElementPositionTop() Related Assertion
verifyNotElementPositionTop() Related Assertion
waitForElementPositionTop() Related Assertion

Definition at line 6292 of file SeleniumTestCaseDoc.php.

waitForNotElementWidth (   $locator,
  $pattern 
)

Assertion: Retrieves the width of an element.

Expected value/condition:

width of an element in pixels

Notes:

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.

Parameters
string$locatoran element locator pointing to an element (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeElementWidth() Base method, from which has been generated (automatically) current method
assertElementWidth() Related Assertion
assertNotElementWidth() Related Assertion
getElementWidth() Related Accessor
verifyElementWidth() Related Assertion
verifyNotElementWidth() Related Assertion
waitForElementWidth() Related Assertion

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.

Expected value/condition:

the results of evaluating the snippet

Notes:

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.

Parameters
string$scriptthe JavaScript snippet to run
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeEval() Base method, from which has been generated (automatically) current method
assertEval() Related Assertion
assertNotEval() Related Assertion
getEval() Related Accessor
verifyEval() Related Assertion
verifyNotEval() Related Assertion
waitForEval() Related Assertion

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.

Expected value/condition:

the value passed in

Notes:

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.

Parameters
string$expressionthe value to return
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeExpression() Base method, from which has been generated (automatically) current method
assertExpression() Related Assertion
assertNotExpression() Related Assertion
getExpression() Related Accessor
verifyExpression() Related Assertion
verifyNotExpression() Related Assertion
waitForExpression() Related Assertion

Definition at line 7098 of file SeleniumTestCaseDoc.php.

waitForNotHtmlSource (   $pattern)

Assertion: Returns the entire HTML source between the opening and closing "html" tags.

Expected value/condition:

the entire HTML source

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeHtmlSource() Base method, from which has been generated (automatically) current method
assertHtmlSource() Related Assertion
assertNotHtmlSource() Related Assertion
getHtmlSource() Related Accessor
verifyHtmlSource() Related Assertion
verifyNotHtmlSource() Related Assertion
waitForHtmlSource() Related Assertion

Definition at line 7323 of file SeleniumTestCaseDoc.php.

waitForNotLocation (   $pattern)

Assertion: Gets the absolute URL of the current page.

Expected value/condition:

the absolute URL of the current page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeLocation() Base method, from which has been generated (automatically) current method
assertLocation() Related Assertion
assertNotLocation() Related Assertion
getLocation() Related Accessor
verifyLocation() Related Assertion
verifyNotLocation() Related Assertion
waitForLocation() Related Assertion

Definition at line 7548 of file SeleniumTestCaseDoc.php.

waitForNotMouseSpeed (   $pattern)

Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Expected value/condition:

the number of pixels between "mousemove" events during dragAndDrop commands (default=10)

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeMouseSpeed() Base method, from which has been generated (automatically) current method
assertMouseSpeed() Related Assertion
assertNotMouseSpeed() Related Assertion
getMouseSpeed() Related Accessor
verifyMouseSpeed() Related Assertion
verifyNotMouseSpeed() Related Assertion
waitForMouseSpeed() Related Assertion

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.

Expected value/condition:

true if element1 is the previous sibling of element2, false otherwise

Notes:

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.

Parameters
string$locator1an element locator pointing to the first element (see Element Locators)
string$locator2an element locator pointing to the second element (see Element Locators)
Returns
void
See also
storeOrdered() Base method, from which has been generated (automatically) current method
assertNotOrdered() Related Assertion
assertOrdered() Related Assertion
isOrdered() Related Accessor
verifyNotOrdered() Related Assertion
verifyOrdered() Related Assertion
waitForOrdered() Related Assertion

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.

Expected value/condition:

the message of the most recent JavaScript question prompt

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storePrompt() Base method, from which has been generated (automatically) current method
assertNotPrompt() Related Assertion
assertPrompt() Related Assertion
getPrompt() Related Accessor
verifyNotPrompt() Related Assertion
verifyPrompt() Related Assertion
waitForPrompt() Related Assertion

Definition at line 8288 of file SeleniumTestCaseDoc.php.

waitForNotSelectedId (   $selectLocator,
  $pattern 
)

Assertion: Gets option element ID for selected option in the specified select element.

Expected value/condition:

the selected option ID in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedId() Base method, from which has been generated (automatically) current method
assertNotSelectedId() Related Assertion
assertSelectedId() Related Assertion
getSelectedId() Related Accessor
verifyNotSelectedId() Related Assertion
verifySelectedId() Related Assertion
waitForSelectedId() Related Assertion

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.

Expected value/condition:

an array of all selected option IDs in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIds() Base method, from which has been generated (automatically) current method
assertNotSelectedIds() Related Assertion
assertSelectedIds() Related Assertion
getSelectedIds() Related Accessor
verifyNotSelectedIds() Related Assertion
verifySelectedIds() Related Assertion
waitForSelectedIds() Related Assertion

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.

Expected value/condition:

the selected option index in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndex() Base method, from which has been generated (automatically) current method
assertNotSelectedIndex() Related Assertion
assertSelectedIndex() Related Assertion
getSelectedIndex() Related Accessor
verifyNotSelectedIndex() Related Assertion
verifySelectedIndex() Related Assertion
waitForSelectedIndex() Related Assertion

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.

Expected value/condition:

an array of all selected option indexes in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndexes() Base method, from which has been generated (automatically) current method
assertNotSelectedIndexes() Related Assertion
assertSelectedIndexes() Related Assertion
getSelectedIndexes() Related Accessor
verifyNotSelectedIndexes() Related Assertion
verifySelectedIndexes() Related Assertion
waitForSelectedIndexes() Related Assertion

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.

Expected value/condition:

the selected option label in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabel() Base method, from which has been generated (automatically) current method
assertNotSelectedLabel() Related Assertion
assertSelectedLabel() Related Assertion
getSelectedLabel() Related Accessor
verifyNotSelectedLabel() Related Assertion
verifySelectedLabel() Related Assertion
waitForSelectedLabel() Related Assertion

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.

Expected value/condition:

an array of all selected option labels in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabels() Base method, from which has been generated (automatically) current method
assertNotSelectedLabels() Related Assertion
assertSelectedLabels() Related Assertion
getSelectedLabels() Related Accessor
verifyNotSelectedLabels() Related Assertion
verifySelectedLabels() Related Assertion
waitForSelectedLabels() Related Assertion

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.

Expected value/condition:

the selected option value in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValue() Base method, from which has been generated (automatically) current method
assertNotSelectedValue() Related Assertion
assertSelectedValue() Related Assertion
getSelectedValue() Related Accessor
verifyNotSelectedValue() Related Assertion
verifySelectedValue() Related Assertion
waitForSelectedValue() Related Assertion

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.

Expected value/condition:

an array of all selected option values in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValues() Base method, from which has been generated (automatically) current method
assertNotSelectedValues() Related Assertion
assertSelectedValues() Related Assertion
getSelectedValues() Related Accessor
verifyNotSelectedValues() Related Assertion
verifySelectedValues() Related Assertion
waitForSelectedValues() Related Assertion

Definition at line 10500 of file SeleniumTestCaseDoc.php.

waitForNotSelectOptions (   $selectLocator,
  $pattern 
)

Assertion: Gets all option labels in the specified select drop-down.

Expected value/condition:

an array of all option labels in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectOptions() Base method, from which has been generated (automatically) current method
assertNotSelectOptions() Related Assertion
assertSelectOptions() Related Assertion
getSelectOptions() Related Accessor
verifyNotSelectOptions() Related Assertion
verifySelectOptions() Related Assertion
waitForSelectOptions() Related Assertion

Definition at line 8537 of file SeleniumTestCaseDoc.php.

waitForNotSomethingSelected (   $selectLocator)

Assertion: Determines whether some option in a drop-down menu is selected.

Expected value/condition:

true if some option has been selected, false otherwise

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
void
See also
storeSomethingSelected() Base method, from which has been generated (automatically) current method
assertNotSomethingSelected() Related Assertion
assertSomethingSelected() Related Assertion
isSomethingSelected() Related Accessor
verifyNotSomethingSelected() Related Assertion
verifySomethingSelected() Related Assertion
waitForSomethingSelected() Related Assertion

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.

Expected value/condition:

the execution speed in milliseconds.

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSpeed() Base method, from which has been generated (automatically) current method
assertNotSpeed() Related Assertion
assertSpeed() Related Assertion
getSpeed() Related Accessor
verifyNotSpeed() Related Assertion
verifySpeed() Related Assertion
waitForSpeed() Related Assertion

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.

Expected value/condition:

the text from the specified cell

Notes:

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.

Parameters
string$tableCellAddressa cell address, e.g. "foo.1.4"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTable() Base method, from which has been generated (automatically) current method
assertNotTable() Related Assertion
assertTable() Related Assertion
getTable() Related Accessor
verifyNotTable() Related Assertion
verifyTable() Related Assertion
waitForTable() Related Assertion

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.

Expected value/condition:

the text of the element

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeText() Base method, from which has been generated (automatically) current method
assertNotText() Related Assertion
assertText() Related Assertion
getText() Related Accessor
verifyNotText() Related Assertion
verifyText() Related Assertion
waitForText() Related Assertion

Definition at line 11492 of file SeleniumTestCaseDoc.php.

waitForNotTitle (   $pattern)

Assertion: Gets the title of the current page.

Expected value/condition:

the title of the current page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTitle() Base method, from which has been generated (automatically) current method
assertNotTitle() Related Assertion
assertTitle() Related Assertion
getTitle() Related Accessor
verifyNotTitle() Related Assertion
verifyTitle() Related Assertion
waitForTitle() Related Assertion

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.

Expected value/condition:

the element value, or "on/off" for checkbox/radio elements

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeValue() Base method, from which has been generated (automatically) current method
assertNotValue() Related Assertion
assertValue() Related Assertion
getValue() Related Accessor
verifyNotValue() Related Assertion
verifyValue() Related Assertion
waitForValue() Related Assertion

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.

Expected value/condition:

true if the specified element is visible, false otherwise

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeVisible() Base method, from which has been generated (automatically) current method
assertNotVisible() Related Assertion
assertVisible() Related Assertion
isVisible() Related Accessor
verifyNotVisible() Related Assertion
verifyVisible() Related Assertion
waitForVisible() Related Assertion

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.

Expected value/condition:

true if the new frame is this code's window

Notes:

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.

Parameters
string$currentFrameStringstarting frame
string$targetnew frame (which might be relative to the current one)
Returns
void
See also
storeWhetherThisFrameMatchFrameExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisFrameMatchFrameExpression() Related Assertion
assertWhetherThisFrameMatchFrameExpression() Related Assertion
getWhetherThisFrameMatchFrameExpression() Related Accessor
verifyNotWhetherThisFrameMatchFrameExpression() Related Assertion
verifyWhetherThisFrameMatchFrameExpression() Related Assertion
waitForWhetherThisFrameMatchFrameExpression() Related Assertion

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.

Expected value/condition:

true if the new window is this code's window

Notes:

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.

Parameters
string$currentWindowStringstarting window
string$targetnew window (which might be relative to the current one, e.g., "_parent")
Returns
void
See also
storeWhetherThisWindowMatchWindowExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisWindowMatchWindowExpression() Related Assertion
assertWhetherThisWindowMatchWindowExpression() Related Assertion
getWhetherThisWindowMatchWindowExpression() Related Accessor
verifyNotWhetherThisWindowMatchWindowExpression() Related Assertion
verifyWhetherThisWindowMatchWindowExpression() Related Assertion
waitForWhetherThisWindowMatchWindowExpression() Related Assertion

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.

Expected value/condition:

the number of nodes that match the specified xpath

Notes:

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.

Parameters
string$xpaththe xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeXpathCount() Base method, from which has been generated (automatically) current method
assertNotXpathCount() Related Assertion
assertXpathCount() Related Assertion
getXpathCount() Related Accessor
verifyNotXpathCount() Related Assertion
verifyXpathCount() Related Assertion
waitForXpathCount() Related Assertion

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.

Expected value/condition:

true if element1 is the previous sibling of element2, false otherwise

Notes:

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.

Parameters
string$locator1an element locator pointing to the first element (see Element Locators)
string$locator2an element locator pointing to the second element (see Element Locators)
Returns
void
See also
storeOrdered() Base method, from which has been generated (automatically) current method
assertNotOrdered() Related Assertion
assertOrdered() Related Assertion
isOrdered() Related Accessor
verifyNotOrdered() Related Assertion
verifyOrdered() Related Assertion
waitForNotOrdered() Related Assertion

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.

Parameters
string$timeouta timeout in milliseconds, after which this command will return with an error
Returns
void

Definition at line 16361 of file SeleniumTestCaseDoc.php.

waitForPopUp (   $windowID,
  $timeout 
)

Waits for a popup window to appear and load up.

Parameters
string$windowIDthe 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$timeouta 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.
Returns
void

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.

Expected value/condition:

the message of the most recent JavaScript question prompt

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storePrompt() Base method, from which has been generated (automatically) current method
assertNotPrompt() Related Assertion
assertPrompt() Related Assertion
getPrompt() Related Accessor
verifyNotPrompt() Related Assertion
verifyPrompt() Related Assertion
waitForNotPrompt() Related Assertion

Definition at line 8327 of file SeleniumTestCaseDoc.php.

waitForPromptNotPresent ( )

Assertion: Has a prompt occurred?

This function never throws an exception .

Expected value/condition:

true if there is a pending prompt

Notes:

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.

Returns
void
See also
storePromptPresent() Base method, from which has been generated (automatically) current method
assertPromptNotPresent() Related Assertion
assertPromptPresent() Related Assertion
isPromptPresent() Related Accessor
verifyPromptNotPresent() Related Assertion
verifyPromptPresent() Related Assertion
waitForPromptPresent() Related Assertion

Definition at line 13270 of file SeleniumTestCaseDoc.php.

waitForPromptPresent ( )

Assertion: Has a prompt occurred?

This function never throws an exception .

Expected value/condition:

true if there is a pending prompt

Notes:

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.

Returns
void
See also
storePromptPresent() Base method, from which has been generated (automatically) current method
assertPromptNotPresent() Related Assertion
assertPromptPresent() Related Assertion
isPromptPresent() Related Accessor
verifyPromptNotPresent() Related Assertion
verifyPromptPresent() Related Assertion
waitForPromptNotPresent() Related Assertion

Definition at line 13300 of file SeleniumTestCaseDoc.php.

waitForSelectedId (   $selectLocator,
  $pattern 
)

Assertion: Gets option element ID for selected option in the specified select element.

Expected value/condition:

the selected option ID in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedId() Base method, from which has been generated (automatically) current method
assertNotSelectedId() Related Assertion
assertSelectedId() Related Assertion
getSelectedId() Related Accessor
verifyNotSelectedId() Related Assertion
verifySelectedId() Related Assertion
waitForNotSelectedId() Related Assertion

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.

Expected value/condition:

an array of all selected option IDs in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIds() Base method, from which has been generated (automatically) current method
assertNotSelectedIds() Related Assertion
assertSelectedIds() Related Assertion
getSelectedIds() Related Accessor
verifyNotSelectedIds() Related Assertion
verifySelectedIds() Related Assertion
waitForNotSelectedIds() Related Assertion

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.

Expected value/condition:

the selected option index in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndex() Base method, from which has been generated (automatically) current method
assertNotSelectedIndex() Related Assertion
assertSelectedIndex() Related Assertion
getSelectedIndex() Related Accessor
verifyNotSelectedIndex() Related Assertion
verifySelectedIndex() Related Assertion
waitForNotSelectedIndex() Related Assertion

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.

Expected value/condition:

an array of all selected option indexes in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedIndexes() Base method, from which has been generated (automatically) current method
assertNotSelectedIndexes() Related Assertion
assertSelectedIndexes() Related Assertion
getSelectedIndexes() Related Accessor
verifyNotSelectedIndexes() Related Assertion
verifySelectedIndexes() Related Assertion
waitForNotSelectedIndexes() Related Assertion

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.

Expected value/condition:

the selected option label in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabel() Base method, from which has been generated (automatically) current method
assertNotSelectedLabel() Related Assertion
assertSelectedLabel() Related Assertion
getSelectedLabel() Related Accessor
verifyNotSelectedLabel() Related Assertion
verifySelectedLabel() Related Assertion
waitForNotSelectedLabel() Related Assertion

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.

Expected value/condition:

an array of all selected option labels in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedLabels() Base method, from which has been generated (automatically) current method
assertNotSelectedLabels() Related Assertion
assertSelectedLabels() Related Assertion
getSelectedLabels() Related Accessor
verifyNotSelectedLabels() Related Assertion
verifySelectedLabels() Related Assertion
waitForNotSelectedLabels() Related Assertion

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.

Expected value/condition:

the selected option value in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValue() Base method, from which has been generated (automatically) current method
assertNotSelectedValue() Related Assertion
assertSelectedValue() Related Assertion
getSelectedValue() Related Accessor
verifyNotSelectedValue() Related Assertion
verifySelectedValue() Related Assertion
waitForNotSelectedValue() Related Assertion

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.

Expected value/condition:

an array of all selected option values in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectedValues() Base method, from which has been generated (automatically) current method
assertNotSelectedValues() Related Assertion
assertSelectedValues() Related Assertion
getSelectedValues() Related Accessor
verifyNotSelectedValues() Related Assertion
verifySelectedValues() Related Assertion
waitForNotSelectedValues() Related Assertion

Definition at line 10534 of file SeleniumTestCaseDoc.php.

waitForSelectOptions (   $selectLocator,
  $pattern 
)

Assertion: Gets all option labels in the specified select drop-down.

Expected value/condition:

an array of all option labels in the specified select drop-down

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSelectOptions() Base method, from which has been generated (automatically) current method
assertNotSelectOptions() Related Assertion
assertSelectOptions() Related Assertion
getSelectOptions() Related Accessor
verifyNotSelectOptions() Related Assertion
verifySelectOptions() Related Assertion
waitForNotSelectOptions() Related Assertion

Definition at line 8570 of file SeleniumTestCaseDoc.php.

waitForSomethingSelected (   $selectLocator)

Assertion: Determines whether some option in a drop-down menu is selected.

Expected value/condition:

true if some option has been selected, false otherwise

Notes:

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.

Parameters
string$selectLocatoran element locator identifying a drop-down menu (see Element Locators)
Returns
void
See also
storeSomethingSelected() Base method, from which has been generated (automatically) current method
assertNotSomethingSelected() Related Assertion
assertSomethingSelected() Related Assertion
isSomethingSelected() Related Accessor
verifyNotSomethingSelected() Related Assertion
verifySomethingSelected() Related Assertion
waitForNotSomethingSelected() Related Assertion

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.

Expected value/condition:

the execution speed in milliseconds.

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeSpeed() Base method, from which has been generated (automatically) current method
assertNotSpeed() Related Assertion
assertSpeed() Related Assertion
getSpeed() Related Accessor
verifyNotSpeed() Related Assertion
verifySpeed() Related Assertion
waitForNotSpeed() Related Assertion

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.

Expected value/condition:

the text from the specified cell

Notes:

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.

Parameters
string$tableCellAddressa cell address, e.g. "foo.1.4"
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTable() Base method, from which has been generated (automatically) current method
assertNotTable() Related Assertion
assertTable() Related Assertion
getTable() Related Accessor
verifyNotTable() Related Assertion
verifyTable() Related Assertion
waitForNotTable() Related Assertion

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.

Expected value/condition:

the text of the element

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeText() Base method, from which has been generated (automatically) current method
assertNotText() Related Assertion
assertText() Related Assertion
getText() Related Accessor
verifyNotText() Related Assertion
verifyText() Related Assertion
waitForNotText() Related Assertion

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.

Expected value/condition:

true if the pattern matches the text, false otherwise

Notes:

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.

Parameters
string$patterna pattern to match with the text of the page (see String match Patterns)
Returns
void
See also
storeTextPresent() Base method, from which has been generated (automatically) current method
assertTextNotPresent() Related Assertion
assertTextPresent() Related Assertion
isTextPresent() Related Accessor
verifyTextNotPresent() Related Assertion
verifyTextPresent() Related Assertion
waitForTextPresent() Related Assertion

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.

Expected value/condition:

true if the pattern matches the text, false otherwise

Notes:

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.

Parameters
string$patterna pattern to match with the text of the page (see String match Patterns)
Returns
void
See also
storeTextPresent() Base method, from which has been generated (automatically) current method
assertTextNotPresent() Related Assertion
assertTextPresent() Related Assertion
isTextPresent() Related Accessor
verifyTextNotPresent() Related Assertion
verifyTextPresent() Related Assertion
waitForTextNotPresent() Related Assertion

Definition at line 13531 of file SeleniumTestCaseDoc.php.

waitForTitle (   $pattern)

Assertion: Gets the title of the current page.

Expected value/condition:

the title of the current page

Notes:

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.

Parameters
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeTitle() Base method, from which has been generated (automatically) current method
assertNotTitle() Related Assertion
assertTitle() Related Assertion
getTitle() Related Accessor
verifyNotTitle() Related Assertion
verifyTitle() Related Assertion
waitForNotTitle() Related Assertion

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.

Expected value/condition:

the element value, or "on/off" for checkbox/radio elements

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeValue() Base method, from which has been generated (automatically) current method
assertNotValue() Related Assertion
assertValue() Related Assertion
getValue() Related Accessor
verifyNotValue() Related Assertion
verifyValue() Related Assertion
waitForNotValue() Related Assertion

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.

Expected value/condition:

true if the specified element is visible, false otherwise

Notes:

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.

Parameters
string$locatoran element locator (see Element Locators)
Returns
void
See also
storeVisible() Base method, from which has been generated (automatically) current method
assertNotVisible() Related Assertion
assertVisible() Related Assertion
isVisible() Related Accessor
verifyNotVisible() Related Assertion
verifyVisible() Related Assertion
waitForNotVisible() Related Assertion

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.

Expected value/condition:

true if the new frame is this code's window

Notes:

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.

Parameters
string$currentFrameStringstarting frame
string$targetnew frame (which might be relative to the current one)
Returns
void
See also
storeWhetherThisFrameMatchFrameExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisFrameMatchFrameExpression() Related Assertion
assertWhetherThisFrameMatchFrameExpression() Related Assertion
getWhetherThisFrameMatchFrameExpression() Related Accessor
verifyNotWhetherThisFrameMatchFrameExpression() Related Assertion
verifyWhetherThisFrameMatchFrameExpression() Related Assertion
waitForNotWhetherThisFrameMatchFrameExpression() Related Assertion

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.

Expected value/condition:

true if the new window is this code's window

Notes:

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.

Parameters
string$currentWindowStringstarting window
string$targetnew window (which might be relative to the current one, e.g., "_parent")
Returns
void
See also
storeWhetherThisWindowMatchWindowExpression() Base method, from which has been generated (automatically) current method
assertNotWhetherThisWindowMatchWindowExpression() Related Assertion
assertWhetherThisWindowMatchWindowExpression() Related Assertion
getWhetherThisWindowMatchWindowExpression() Related Accessor
verifyNotWhetherThisWindowMatchWindowExpression() Related Assertion
verifyWhetherThisWindowMatchWindowExpression() Related Assertion
waitForNotWhetherThisWindowMatchWindowExpression() Related Assertion

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.

Expected value/condition:

the number of nodes that match the specified xpath

Notes:

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.

Parameters
string$xpaththe xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
string$patternthe String-match Patterns (see String match Patterns)
Returns
void
See also
storeXpathCount() Base method, from which has been generated (automatically) current method
assertNotXpathCount() Related Assertion
assertXpathCount() Related Assertion
getXpathCount() Related Accessor
verifyNotXpathCount() Related Assertion
verifyXpathCount() Related Assertion
waitForNotXpathCount() Related Assertion

Definition at line 13077 of file SeleniumTestCaseDoc.php.

windowFocus ( )

Gives focus to the currently selected window.

Returns
void

Definition at line 16389 of file SeleniumTestCaseDoc.php.

windowMaximize ( )

Resize currently selected window to take up the entire screen.

Returns
void

Definition at line 16399 of file SeleniumTestCaseDoc.php.

Variable Documentation

$doc_Element_Filters

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:

  • value=valuePattern
    Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.
  • index=index
    Selects a single element based on its position in the list (offset from zero).

Definition at line 97 of file SeleniumTestCaseDoc.php.

$doc_Element_Locators

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):

  • identifier=id
    Select the element with the specified @ id attribute. If no match is found, select the first element whose @ name attribute is id. This is normally the default; see below.
  • id=id
    Select the element with the specified @ id attribute.
  • name=name
    Select the first element with the specified @ name attribute.
    – username
    – name=username
    – name=flavour value=chocolate
    The name may optionally be followed by one or more element-filters, separated from the name by whitespace. If the filterType is not specified, value is assumed. (see "Element Filters" below)
  • dom=javascriptExpression
    Find an element by evaluating the specified string. This allows you to traverse the HTML Document Object Model using JavaScript. Note that you must not return a value in this string; simply make it the last expression in the block.
    – dom=document.forms['myForm'].myDropdown
    – dom=document.images[56]
    – dom=function foo() { return document.links[1]; }; foo();
  • xpath=xpathExpression
    Locate an element using an XPath expression.
    – xpath=//img[@ alt='The image alt text']
    – xpath=//table[@ id='table1']//tr[4]/td[2]
    – xpath=//a[contains(@ href,'#id1')]
    – xpath=//a[contains(@ href,'#id1')]/@ class
    – xpath=(//table[@ class='stylee'])//th[text()='theHeaderText']/../td
    – xpath=//input[@ name='name2' and @ value='yes']
    – xpath=//*[text()="right"]
  • link=textPattern
    Select the link (anchor) element which contains text matching the specified pattern.
    – link=The link text
  • css=cssSelectorSyntax
    Select the element using css selectors. Please refer to CSS2 selectors, CSS3 selectors for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.
    – css=a[href="#id3"]
    – css=span::firstChild + span
    Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after).
  • ui=uiSpecifierString
    Locate an element by resolving the UI specifier string to another locator, and evaluating it. See the Selenium UI-Element Reference for more details.
    – ui=loginPages::loginButton()
    – ui=settingsPages::toggle(label=Hide Email)
    – ui=forumPages::postBody(index=2)//a[2]

Without an explicit locator prefix, Selenium uses the following default strategies:

  • dom, for locators starting with "document."
  • xpath, for locators starting with "//"
  • identifier, otherwise

Definition at line 82 of file SeleniumTestCaseDoc.php.

$doc_Stored_Variables

Stored Variables and Javascript evaluation

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.

Stored Variables

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

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.

Example:


     $this->storeTitle('pageTitle');
     $this->storeText('css=.text','elementText');
     $this->store('fullPageTitle', '{$pageTitle} -- ${elementText}');
     $this->type('textElement', 'Page title is: ${fullPageTitle}');

Javascript evaluation

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.

Example:


     $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

String-match Patterns

Various Pattern syntaxes are available for matching string values:

  • glob:pattern
    Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a kind of limited regular-expression syntax typically used in command-line shells. In a glob pattern, "*" represents any sequence of characters, and "?" represents any single character. Glob patterns match against the entire string.
  • regexp:regexp
    Match a string using a regular-expression. The full power of JavaScript regular-expressions is available.
  • regexpi:regexpi
    Match a string using a case-insensitive regular-expression.
  • exact:string
    Match a string exactly, verbatim, without any of that fancy wildcard stuff.

Definition at line 116 of file SeleniumTestCaseDoc.php.

trait SeleniumTestCaseDoc
Initial value:
{
private $dummy

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

See also
http://release.seleniumhq.org/selenium-core/1.0.1/reference.html
https://github.com/IStranger/phpunit-selenium-doc
Author
G.Azamat m@fx4.nosp@m.web..nosp@m.com
Date
2015-05-22

Definition at line 19 of file SeleniumTestCaseDoc.php.