This command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").
| string | $url | the URL to open, which can be blank |
| string | $windowID | the JavaScript window ID of the window to select |
Definition at line 15350 of file SeleniumTestCaseDoc.php.
| openWindowAndWait | ( | $url, | |
| $windowID | |||
| ) |
Opens a popup window (if a window with that ID isn't already open).
After opening the window, you'll need to select it using the selectWindow command.
This command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $url | the URL to open, which can be blank |
| string | $windowID | the JavaScript window ID of the window to select |
Definition at line 15376 of file SeleniumTestCaseDoc.php.
| pause | ( | $waitTime | ) |
Wait for the specified amount of time (in milliseconds).
| string | $waitTime | the amount of time to sleep (in milliseconds) |
Definition at line 15388 of file SeleniumTestCaseDoc.php.
| refresh | ( | ) |
Simulates the user clicking the "Refresh" button on their browser.
Definition at line 15400 of file SeleniumTestCaseDoc.php.
| refreshAndWait | ( | ) |
Simulates the user clicking the "Refresh" button on their browser.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 15416 of file SeleniumTestCaseDoc.php.
| removeAllSelections | ( | $locator | ) |
Unselects all of the selected options in a multi-select element.
| string | $locator | an element locator identifying a multi-select box (see Element Locators) |
Definition at line 15431 of file SeleniumTestCaseDoc.php.
| removeAllSelectionsAndWait | ( | $locator | ) |
Unselects all of the selected options in a multi-select element.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $locator | an element locator identifying a multi-select box (see Element Locators) |
Definition at line 15450 of file SeleniumTestCaseDoc.php.
| removeScript | ( | $scriptTagId | ) |
Removes a script tag from the Selenium document identified by the given id.
Does nothing if the referenced tag doesn't exist.
| string | $scriptTagId | the id of the script element to remove. |
Definition at line 15466 of file SeleniumTestCaseDoc.php.
| removeScriptAndWait | ( | $scriptTagId | ) |
Removes a script tag from the Selenium document identified by the given id.
Does nothing if the referenced tag doesn't exist.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $scriptTagId | the id of the script element to remove. |
Definition at line 15486 of file SeleniumTestCaseDoc.php.
| removeSelection | ( | $locator, | |
| $optionLocator | |||
| ) |
Remove a selection from the set of selected options in a multi-select element using an option locator.
See select() for details of option locators.
| string | $locator | an element locator identifying a multi-select box (see Element Locators) |
| string | $optionLocator | an option locator (a label by default) |
Definition at line 15504 of file SeleniumTestCaseDoc.php.
| removeSelectionAndWait | ( | $locator, | |
| $optionLocator | |||
| ) |
Remove a selection from the set of selected options in a multi-select element using an option locator.
See select() for details of option locators.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $locator | an element locator identifying a multi-select box (see Element Locators) |
| string | $optionLocator | an option locator (a label by default) |
Definition at line 15526 of file SeleniumTestCaseDoc.php.
| retrieveLastRemoteControlLogs | ( | ) |
Retrieve the last messages logged on a specific remote control.
Useful for error reports, especially when running multiple remote controls in a distributed environment. The maximum number of log messages that can be retrieve is configured on remote control startup.
Definition at line 15539 of file SeleniumTestCaseDoc.php.
| rollup | ( | $rollupName, | |
| $kwargs | |||
| ) |
Executes a command rollup, which is a series of commands with a unique name, and optionally arguments that control the generation of the set of commands.
If any one of the rolled-up commands fails, the rollup is considered to have failed. Rollups may also contain nested rollups.
| string | $rollupName | the name of the rollup command |
| string | $kwargs | keyword arguments string that influences how the rollup expands into commands |
Definition at line 15558 of file SeleniumTestCaseDoc.php.
| rollupAndWait | ( | $rollupName, | |
| $kwargs | |||
| ) |
Executes a command rollup, which is a series of commands with a unique name, and optionally arguments that control the generation of the set of commands.
If any one of the rolled-up commands fails, the rollup is considered to have failed. Rollups may also contain nested rollups.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $rollupName | the name of the rollup command |
| string | $kwargs | keyword arguments string that influences how the rollup expands into commands |
Definition at line 15581 of file SeleniumTestCaseDoc.php.
| runScript | ( | $script | ) |
Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command.
Scripts run in this way can often be debugged more easily than scripts executed using Selenium's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception.
| string | $script | the JavaScript snippet to run |
Definition at line 15600 of file SeleniumTestCaseDoc.php.
| runScriptAndWait | ( | $script | ) |
Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command.
Scripts run in this way can often be debugged more easily than scripts executed using Selenium's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $script | the JavaScript snippet to run |
Definition at line 15623 of file SeleniumTestCaseDoc.php.
| select | ( | $selectLocator, | |
| $optionLocator | |||
| ) |
Select an option from a drop-down using an option locator.
Option locators provide different ways of specifying options of an HTML Select element(e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification).There are several forms of Select Option Locator.
If no option locator prefix is provided, the default behaviour is to match on label.
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $optionLocator | an option locator (a label by default) |
Definition at line 15656 of file SeleniumTestCaseDoc.php.
| selectAndWait | ( | $selectLocator, | |
| $optionLocator | |||
| ) |
Select an option from a drop-down using an option locator.
Option locators provide different ways of specifying options of an HTML Select element(e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification).There are several forms of Select Option Locator.
If no option locator prefix is provided, the default behaviour is to match on label.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $optionLocator | an option locator (a label by default) |
Definition at line 15693 of file SeleniumTestCaseDoc.php.
| selectFrame | ( | $locator | ) |
Selects a frame within the current window. (You may invoke this command multiple times to select nested frames.) To select the parent frame, use "relative=parent" as a locator; to select the top frame, use "relative=top".
You can also select a frame by its 0-based index number; select the first frame with "index=0", or the third frame with "index=2".
You may also use a DOM expression to identify the frame you want directly, like this: [dom=frames["main"].frames["subframe"]] .
| string | $locator | an element locator identifying a frame or iframe (see Element Locators) |
Definition at line 15713 of file SeleniumTestCaseDoc.php.
| selectPopUp | ( | $windowID | ) |
Simplifies the process of selecting a popup window (and does not offer functionality beyond what [selectWindow()] already provides).
| string | $windowID | an identifier for the popup window, which can take on a number of different meanings |
Definition at line 15738 of file SeleniumTestCaseDoc.php.
| selectPopUpAndWait | ( | $windowID | ) |
Simplifies the process of selecting a popup window (and does not offer functionality beyond what [selectWindow()] already provides).
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $windowID | an identifier for the popup window, which can take on a number of different meanings |
Definition at line 15767 of file SeleniumTestCaseDoc.php.
| selectWindow | ( | $windowID | ) |
Selects a popup window using a window locator; once a popup window has been selected, all commands go to that window.
To select the main window again, use null as the target.
Window locators provide different ways of specifying the window object: by title, by internal JavaScript "name," or by JavaScript variable.
If no window locator prefix is provided, we'll try to guess what you mean like this:
1.) if windowID is null, (or the string "null") then it is assumed the user is referring to the original window instantiated by the browser).
2.) if the value of the "windowID" parameter is a JavaScript variable name in the current application window, then it is assumed that this variable contains the return value from a call to the JavaScript window.open() method.
3.) Otherwise, selenium looks in a hash it maintains that maps string names to window "names".
4.) If that fails, we'll try looping over all of the known windows to try to find the appropriate "title". Since "title" is not necessarily unique, this may have unexpected behavior.
If you're having trouble figuring out the name of a window that you want to manipulate, look at the Selenium log messages which identify the names of windows created via window.open (and therefore intercepted by Selenium). You will see messages like the following for each window as it is opened:
[debug: window.open call intercepted; window ID (which you can use with selectWindow()) is "myNewWindow"]
In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). (This is bug SEL-339.) In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").
| string | $windowID | the JavaScript window ID of the window to select |
Definition at line 15823 of file SeleniumTestCaseDoc.php.
| setBrowserLogLevel | ( | $logLevel | ) |
Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
Valid logLevel strings are: "debug", "info", "warn", "error" or "off". To see the browser logs, you need to either show the log window in GUI mode, or enable browser-side logging in Selenium RC.
| string | $logLevel | one of the following: "debug", "info", "warn", "error" or "off" |
Definition at line 15840 of file SeleniumTestCaseDoc.php.
| setBrowserLogLevelAndWait | ( | $logLevel | ) |
Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
Valid logLevel strings are: "debug", "info", "warn", "error" or "off". To see the browser logs, you need to either show the log window in GUI mode, or enable browser-side logging in Selenium RC.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $logLevel | one of the following: "debug", "info", "warn", "error" or "off" |
Definition at line 15861 of file SeleniumTestCaseDoc.php.
| setContext | ( | $context | ) |
Writes a message to the status bar and adds a note to the browser-side log.
| string | $context | the message to be sent to the browser |
Definition at line 15873 of file SeleniumTestCaseDoc.php.
| setCursorPosition | ( | $locator, | |
| $position | |||
| ) |
Moves the text cursor to the specified position in the given input element or textarea.
This method will fail if the specified element isn't an input element or textarea.
| string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
| string | $position | the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field. |
Definition at line 15893 of file SeleniumTestCaseDoc.php.
| setCursorPositionAndWait | ( | $locator, | |
| $position | |||
| ) |
Moves the text cursor to the specified position in the given input element or textarea.
This method will fail if the specified element isn't an input element or textarea.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
| string | $position | the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field. |
Definition at line 15917 of file SeleniumTestCaseDoc.php.
| setMouseSpeed | ( | $pixels | ) |
Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
Setting this value to 0 means that we'll send a "mousemove" event to every single pixel in between the start location and the end location; that can be very slow, and may cause some browsers to force the JavaScript to timeout.
If the mouse speed is greater than the distance between the two dragged objects, we'll just send one "mousemove" at the start location and then one final one at the end location.
| string | $pixels | the number of pixels between "mousemove" events |
Definition at line 15938 of file SeleniumTestCaseDoc.php.
| setMouseSpeedAndWait | ( | $pixels | ) |
Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
Setting this value to 0 means that we'll send a "mousemove" event to every single pixel in between the start location and the end location; that can be very slow, and may cause some browsers to force the JavaScript to timeout.
If the mouse speed is greater than the distance between the two dragged objects, we'll just send one "mousemove" at the start location and then one final one at the end location.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $pixels | the number of pixels between "mousemove" events |
Definition at line 15963 of file SeleniumTestCaseDoc.php.
| setSpeed | ( | $value | ) |
Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds.
| string | $value | the number of milliseconds to pause after operation |
Definition at line 15979 of file SeleniumTestCaseDoc.php.
| setSpeedAndWait | ( | $value | ) |
Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $value | the number of milliseconds to pause after operation |
Definition at line 15999 of file SeleniumTestCaseDoc.php.
| shiftKeyDown | ( | ) |
Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
Definition at line 16011 of file SeleniumTestCaseDoc.php.
| shiftKeyDownAndWait | ( | ) |
Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 16027 of file SeleniumTestCaseDoc.php.
| shiftKeyUp | ( | ) |
Release the shift key.
Definition at line 16039 of file SeleniumTestCaseDoc.php.
| shiftKeyUpAndWait | ( | ) |
Release the shift key.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
Definition at line 16055 of file SeleniumTestCaseDoc.php.
| shutDownSeleniumServer | ( | ) |
Kills the running Selenium Server and all browser sessions.
After you run this command, you will no longer be able to send commands to the server; you can't remotely start the server once it has been stopped. Normally you should prefer to run the "stop" command, which terminates the current browser session, rather than shutting down the entire server.
Definition at line 16069 of file SeleniumTestCaseDoc.php.
| store | ( | $expression, | |
| $variableName | |||
| ) |
This command is a synonym for storeExpression.
| string | $expression | the value to store |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 16083 of file SeleniumTestCaseDoc.php.
| storeAlert | ( | $variableName | ) |
Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 554 of file SeleniumTestCaseDoc.php.
| storeAlertPresent | ( | $variableName | ) |
Has an alert occurred?
This function never throws an exception .
true if there is an alert (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 817 of file SeleniumTestCaseDoc.php.
| storeAllButtons | ( | $variableName | ) |
Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1046 of file SeleniumTestCaseDoc.php.
| storeAllFields | ( | $variableName | ) |
Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1287 of file SeleniumTestCaseDoc.php.
| storeAllLinks | ( | $variableName | ) |
Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1528 of file SeleniumTestCaseDoc.php.
| storeAllWindowIds | ( | $variableName | ) |
Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about. (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1762 of file SeleniumTestCaseDoc.php.
| storeAllWindowNames | ( | $variableName | ) |
Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about. (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 1988 of file SeleniumTestCaseDoc.php.
| storeAllWindowTitles | ( | $variableName | ) |
Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about. (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 2214 of file SeleniumTestCaseDoc.php.
| storeAttribute | ( | $attributeLocator, | |
| $variableName | |||
| ) |
Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute (see Stored Variables)
| string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 2456 of file SeleniumTestCaseDoc.php.
| storeAttributeFromAllWindows | ( | $attributeName, | |
| $variableName | |||
| ) |
Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows. (see Stored Variables)
| string | $attributeName | name of an attribute on the windows |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 2706 of file SeleniumTestCaseDoc.php.
| storeBodyText | ( | $variableName | ) |
Gets the entire text of the page.
the entire text of the page (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 2939 of file SeleniumTestCaseDoc.php.
| storeChecked | ( | $locator, | |
| $variableName | |||
| ) |
Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise (see Stored Variables)
| string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 3177 of file SeleniumTestCaseDoc.php.
| storeConfirmation | ( | $variableName | ) |
Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 3459 of file SeleniumTestCaseDoc.php.
| storeConfirmationPresent | ( | $variableName | ) |
Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 3734 of file SeleniumTestCaseDoc.php.
| storeCookie | ( | $variableName | ) |
Return all cookies of the current page under test.
all cookies of the current page under test (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 3955 of file SeleniumTestCaseDoc.php.
| storeCookieByName | ( | $name, | |
| $variableName | |||
| ) |
Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie (see Stored Variables)
| string | $name | the name of the cookie |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 4187 of file SeleniumTestCaseDoc.php.
| storeCookiePresent | ( | $name, | |
| $variableName | |||
| ) |
Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise. (see Stored Variables)
| string | $name | the name of the cookie |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 4422 of file SeleniumTestCaseDoc.php.
| storeCursorPosition | ( | $locator, | |
| $variableName | |||
| ) |
Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field (see Stored Variables)
| string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 4676 of file SeleniumTestCaseDoc.php.
| storeEditable | ( | $locator, | |
| $variableName | |||
| ) |
Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise (see Stored Variables)
| string | $locator | an element locator (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 4947 of file SeleniumTestCaseDoc.php.
| storeElementHeight | ( | $locator, | |
| $variableName | |||
| ) |
Retrieves the height of an element.
height of an element in pixels (see Stored Variables)
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 5189 of file SeleniumTestCaseDoc.php.
| storeElementIndex | ( | $locator, | |
| $variableName | |||
| ) |
Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0) (see Stored Variables)
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 5440 of file SeleniumTestCaseDoc.php.
| storeElementPositionLeft | ( | $locator, | |
| $variableName | |||
| ) |
Retrieves the horizontal position of an element.
of pixels from the edge of the frame. (see Stored Variables)
| string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 5920 of file SeleniumTestCaseDoc.php.
| storeElementPositionTop | ( | $locator, | |
| $variableName | |||
| ) |
Retrieves the vertical position of an element.
of pixels from the edge of the frame. (see Stored Variables)
| string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 6162 of file SeleniumTestCaseDoc.php.
| storeElementPresent | ( | $locator, | |
| $variableName | |||
| ) |
Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise (see Stored Variables)
| string | $locator | an element locator (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 5686 of file SeleniumTestCaseDoc.php.
| storeElementWidth | ( | $locator, | |
| $variableName | |||
| ) |
Retrieves the width of an element.
width of an element in pixels (see Stored Variables)
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 6404 of file SeleniumTestCaseDoc.php.
| storeEval | ( | $script, | |
| $variableName | |||
| ) |
Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet (see Stored Variables)
| string | $script | the JavaScript snippet to run |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 6678 of file SeleniumTestCaseDoc.php.
| storeExpression | ( | $expression, | |
| $variableName | |||
| ) |
Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in (see Stored Variables)
| string | $expression | the value to return |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 6960 of file SeleniumTestCaseDoc.php.
| storeHtmlSource | ( | $variableName | ) |
Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 7201 of file SeleniumTestCaseDoc.php.
| storeLocation | ( | $variableName | ) |
Gets the absolute URL of the current page.
the absolute URL of the current page (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 7426 of file SeleniumTestCaseDoc.php.
| storeMouseSpeed | ( | $variableName | ) |
Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10) (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 7652 of file SeleniumTestCaseDoc.php.
| storeOrdered | ( | $locator1, | |
| $locator2, | |||
| $variableName | |||
| ) |
Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise (see Stored Variables)
| string | $locator1 | an element locator pointing to the first element (see Element Locators) |
| string | $locator2 | an element locator pointing to the second element (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 7899 of file SeleniumTestCaseDoc.php.
| storePrompt | ( | $variableName | ) |
Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 8173 of file SeleniumTestCaseDoc.php.
| storePromptPresent | ( | $variableName | ) |
Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 13182 of file SeleniumTestCaseDoc.php.
| storeSelectedId | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 8683 of file SeleniumTestCaseDoc.php.
| storeSelectedIds | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 8926 of file SeleniumTestCaseDoc.php.
| storeSelectedIndex | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 9169 of file SeleniumTestCaseDoc.php.
| storeSelectedIndexes | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 9416 of file SeleniumTestCaseDoc.php.
| storeSelectedLabel | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 9663 of file SeleniumTestCaseDoc.php.
| storeSelectedLabels | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 9908 of file SeleniumTestCaseDoc.php.
| storeSelectedValue | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 10155 of file SeleniumTestCaseDoc.php.
| storeSelectedValues | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 10400 of file SeleniumTestCaseDoc.php.
| storeSelectOptions | ( | $selectLocator, | |
| $variableName | |||
| ) |
Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 8440 of file SeleniumTestCaseDoc.php.
| storeSomethingSelected | ( | $selectLocator, | |
| $variableName | |||
| ) |
Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise (see Stored Variables)
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 10643 of file SeleniumTestCaseDoc.php.
| storeSpeed | ( | $variableName | ) |
Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds. (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 10878 of file SeleniumTestCaseDoc.php.
| storeTable | ( | $tableCellAddress, | |
| $variableName | |||
| ) |
Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell (see Stored Variables)
| string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 11128 of file SeleniumTestCaseDoc.php.
| storeText | ( | $locator, | |
| $variableName | |||
| ) |
Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element (see Stored Variables)
| string | $locator | an element locator (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 11386 of file SeleniumTestCaseDoc.php.
| storeTextPresent | ( | $pattern, | |
| $variableName | |||
| ) |
Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise (see Stored Variables)
| string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 13409 of file SeleniumTestCaseDoc.php.
| storeTitle | ( | $variableName | ) |
Gets the title of the current page.
the title of the current page (see Stored Variables)
| string | $variableName | the name of a variable in which the result is to be stored (see Stored Variables) |
Definition at line 11631 of file SeleniumTestCaseDoc.php.
| storeValue | ( | $locator, | |
| $variableName | |||
| ) |
Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements (see Stored Variables)
| string | $locator | an element locator (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 11874 of file SeleniumTestCaseDoc.php.
| storeVisible | ( | $locator, | |
| $variableName | |||
| ) |
Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise (see Stored Variables)
| string | $locator | an element locator (see Element Locators) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 12137 of file SeleniumTestCaseDoc.php.
| storeWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
| $target, | |||
| $variableName | |||
| ) |
Determine whether current/locator identify the frame containing this running code.
This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" frame. In this case, when the test calls selectFrame, this routine is called for each frame to figure out which one has been selected. The selected frame will return true, while all others will return false.
true if the new frame is this code's window (see Stored Variables)
| string | $currentFrameString | starting frame |
| string | $target | new frame (which might be relative to the current one) |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 12406 of file SeleniumTestCaseDoc.php.
| storeWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
| $target, | |||
| $variableName | |||
| ) |
Determine whether currentWindowString plus target identify the window containing this running code.
This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" window. In this case, when the test calls selectWindow, this routine is called for each window to figure out which one has been selected. The selected window will return true, while all others will return false.
true if the new window is this code's window (see Stored Variables)
| string | $currentWindowString | starting window |
| string | $target | new window (which might be relative to the current one, e.g., "_parent") |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 12683 of file SeleniumTestCaseDoc.php.
| storeXpathCount | ( | $xpath, | |
| $variableName | |||
| ) |
Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath (see Stored Variables)
| string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
| string | $variableName | the name of a variable in which the result is to be stored. (see Stored Variables) |
Definition at line 12943 of file SeleniumTestCaseDoc.php.
| submit | ( | $formLocator | ) |
Submit the specified form.
This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms.
| string | $formLocator | an element locator for the form you want to submit (see Element Locators) |
Definition at line 16100 of file SeleniumTestCaseDoc.php.
| submitAndWait | ( | $formLocator | ) |
Submit the specified form.
This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $formLocator | an element locator for the form you want to submit (see Element Locators) |
Definition at line 16121 of file SeleniumTestCaseDoc.php.
| type | ( | $locator, | |
| $value | |||
| ) |
Sets the value of an input field, as though you typed it in.
Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text.
| string | $locator | an element locator (see Element Locators) |
| string | $value | the value to type |
Definition at line 16140 of file SeleniumTestCaseDoc.php.
| typeAndWait | ( | $locator, | |
| $value | |||
| ) |
Sets the value of an input field, as though you typed it in.
Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $locator | an element locator (see Element Locators) |
| string | $value | the value to type |
Definition at line 16163 of file SeleniumTestCaseDoc.php.
| typeKeys | ( | $locator, | |
| $value | |||
| ) |
Simulates keystroke events on the specified element, as though you typed the value key-by-key.
This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.
Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field.
In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.
| string | $locator | an element locator (see Element Locators) |
| string | $value | the value to type |
Definition at line 16191 of file SeleniumTestCaseDoc.php.
| typeKeysAndWait | ( | $locator, | |
| $value | |||
| ) |
Simulates keystroke events on the specified element, as though you typed the value key-by-key.
This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.
Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field.
In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $locator | an element locator (see Element Locators) |
| string | $value | the value to type |
Definition at line 16223 of file SeleniumTestCaseDoc.php.
| uncheck | ( | $locator | ) |
Uncheck a toggle-button (checkbox/radio).
| string | $locator | an element locator (see Element Locators) |
Definition at line 16238 of file SeleniumTestCaseDoc.php.
| uncheckAndWait | ( | $locator | ) |
Uncheck a toggle-button (checkbox/radio).
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $locator | an element locator (see Element Locators) |
Definition at line 16257 of file SeleniumTestCaseDoc.php.
| useXpathLibrary | ( | $libraryName | ) |
Allows choice of one of the available libraries.
| string | $libraryName | name of the desired library Only the following three can be chosen: <ul> <li>"ajaxslt" - Google's library</li> <li>"javascript-xpath" - Cybozu Labs' faster library</li> <li>"default" - The default library. Currently the default library is "ajaxslt" .</li> </ul> If libraryName isn't one of these three, then no change will be made. |
Definition at line 16280 of file SeleniumTestCaseDoc.php.
| useXpathLibraryAndWait | ( | $libraryName | ) |
Allows choice of one of the available libraries.
After execution of this action, Selenium wait for a new page to load (see waitForPageToLoad())
| string | $libraryName | name of the desired library Only the following three can be chosen: <ul> <li>"ajaxslt" - Google's library</li> <li>"javascript-xpath" - Cybozu Labs' faster library</li> <li>"default" - The default library. Currently the default library is "ajaxslt" .</li> </ul> If libraryName isn't one of these three, then no change will be made. |
Definition at line 16307 of file SeleniumTestCaseDoc.php.
| verifyAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlert()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 593 of file SeleniumTestCaseDoc.php.
| verifyAlertNotPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlertNotPresent()).
Definition at line 846 of file SeleniumTestCaseDoc.php.
| verifyAlertPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAlertPresent()).
Definition at line 875 of file SeleniumTestCaseDoc.php.
| verifyAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllButtons()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1078 of file SeleniumTestCaseDoc.php.
| verifyAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllFields()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1319 of file SeleniumTestCaseDoc.php.
| verifyAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllLinks()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1560 of file SeleniumTestCaseDoc.php.
| verifyAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowIds()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1792 of file SeleniumTestCaseDoc.php.
| verifyAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowNames()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2018 of file SeleniumTestCaseDoc.php.
| verifyAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAllWindowTitles()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2244 of file SeleniumTestCaseDoc.php.
| verifyAttribute | ( | $attributeLocator, | |
| $pattern | |||
| ) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAttribute()).
| string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2490 of file SeleniumTestCaseDoc.php.
| verifyAttributeFromAllWindows | ( | $attributeName, | |
| $pattern | |||
| ) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertAttributeFromAllWindows()).
| string | $attributeName | name of an attribute on the windows |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2738 of file SeleniumTestCaseDoc.php.
| verifyBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertBodyText()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2969 of file SeleniumTestCaseDoc.php.
| verifyChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertChecked()).
| string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3209 of file SeleniumTestCaseDoc.php.
| verifyConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmation()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3501 of file SeleniumTestCaseDoc.php.
| verifyConfirmationNotPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmationNotPresent()).
Definition at line 3763 of file SeleniumTestCaseDoc.php.
| verifyConfirmationPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
If assertion will fail the test, it will continue to run the test case (in contrast to the assertConfirmationPresent()).
Definition at line 3792 of file SeleniumTestCaseDoc.php.
| verifyCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookie()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3985 of file SeleniumTestCaseDoc.php.
| verifyCookieByName | ( | $name, | |
| $pattern | |||
| ) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookieByName()).
| string | $name | the name of the cookie |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4219 of file SeleniumTestCaseDoc.php.
| verifyCookieNotPresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookieNotPresent()).
| string | $name | the name of the cookie |
Definition at line 4451 of file SeleniumTestCaseDoc.php.
| verifyCookiePresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCookiePresent()).
| string | $name | the name of the cookie |
Definition at line 4480 of file SeleniumTestCaseDoc.php.
| verifyCursorPosition | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
If assertion will fail the test, it will continue to run the test case (in contrast to the assertCursorPosition()).
| string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4714 of file SeleniumTestCaseDoc.php.
| verifyEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertEditable()).
| string | $locator | an element locator (see Element Locators) |
Definition at line 4979 of file SeleniumTestCaseDoc.php.
| verifyElementHeight | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the height of an element.
height of an element in pixels
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementHeight()).
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5221 of file SeleniumTestCaseDoc.php.
| verifyElementIndex | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementIndex()).
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5474 of file SeleniumTestCaseDoc.php.
| verifyElementNotPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementNotPresent()).
| string | $locator | an element locator (see Element Locators) |
Definition at line 5716 of file SeleniumTestCaseDoc.php.
| verifyElementPositionLeft | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPositionLeft()).
| string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5952 of file SeleniumTestCaseDoc.php.
| verifyElementPositionTop | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPositionTop()).
| string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6194 of file SeleniumTestCaseDoc.php.
| verifyElementPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementPresent()).
| string | $locator | an element locator (see Element Locators) |
Definition at line 5746 of file SeleniumTestCaseDoc.php.
| verifyElementWidth | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the width of an element.
width of an element in pixels
If assertion will fail the test, it will continue to run the test case (in contrast to the assertElementWidth()).
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6436 of file SeleniumTestCaseDoc.php.
| verifyEval | ( | $script, | |
| $pattern | |||
| ) |
Assertion: Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet
If assertion will fail the test, it will continue to run the test case (in contrast to the assertEval()).
| string | $script | the JavaScript snippet to run |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6718 of file SeleniumTestCaseDoc.php.
| verifyExpression | ( | $expression, | |
| $pattern | |||
| ) |
Assertion: Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in
If assertion will fail the test, it will continue to run the test case (in contrast to the assertExpression()).
| string | $expression | the value to return |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6994 of file SeleniumTestCaseDoc.php.
| verifyHtmlSource | ( | $pattern | ) |
Assertion: Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source
If assertion will fail the test, it will continue to run the test case (in contrast to the assertHtmlSource()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7231 of file SeleniumTestCaseDoc.php.
| verifyLocation | ( | $pattern | ) |
Assertion: Gets the absolute URL of the current page.
the absolute URL of the current page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertLocation()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7456 of file SeleniumTestCaseDoc.php.
| verifyMouseSpeed | ( | $pattern | ) |
Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
If assertion will fail the test, it will continue to run the test case (in contrast to the assertMouseSpeed()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7682 of file SeleniumTestCaseDoc.php.
| verifyNotAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAlert()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 632 of file SeleniumTestCaseDoc.php.
| verifyNotAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllButtons()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1110 of file SeleniumTestCaseDoc.php.
| verifyNotAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllFields()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1351 of file SeleniumTestCaseDoc.php.
| verifyNotAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllLinks()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1592 of file SeleniumTestCaseDoc.php.
| verifyNotAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowIds()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1822 of file SeleniumTestCaseDoc.php.
| verifyNotAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowNames()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2048 of file SeleniumTestCaseDoc.php.
| verifyNotAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAllWindowTitles()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2274 of file SeleniumTestCaseDoc.php.
| verifyNotAttribute | ( | $attributeLocator, | |
| $pattern | |||
| ) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAttribute()).
| string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2524 of file SeleniumTestCaseDoc.php.
| verifyNotAttributeFromAllWindows | ( | $attributeName, | |
| $pattern | |||
| ) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotAttributeFromAllWindows()).
| string | $attributeName | name of an attribute on the windows |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2770 of file SeleniumTestCaseDoc.php.
| verifyNotBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotBodyText()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2999 of file SeleniumTestCaseDoc.php.
| verifyNotChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotChecked()).
| string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3241 of file SeleniumTestCaseDoc.php.
| verifyNotConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotConfirmation()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3543 of file SeleniumTestCaseDoc.php.
| verifyNotCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCookie()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4015 of file SeleniumTestCaseDoc.php.
| verifyNotCookieByName | ( | $name, | |
| $pattern | |||
| ) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCookieByName()).
| string | $name | the name of the cookie |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4251 of file SeleniumTestCaseDoc.php.
| verifyNotCursorPosition | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotCursorPosition()).
| string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4752 of file SeleniumTestCaseDoc.php.
| verifyNotEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotEditable()).
| string | $locator | an element locator (see Element Locators) |
Definition at line 5011 of file SeleniumTestCaseDoc.php.
| verifyNotElementHeight | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the height of an element.
height of an element in pixels
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementHeight()).
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5253 of file SeleniumTestCaseDoc.php.
| verifyNotElementIndex | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementIndex()).
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5508 of file SeleniumTestCaseDoc.php.
| verifyNotElementPositionLeft | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementPositionLeft()).
| string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5984 of file SeleniumTestCaseDoc.php.
| verifyNotElementPositionTop | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementPositionTop()).
| string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6226 of file SeleniumTestCaseDoc.php.
| verifyNotElementWidth | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the width of an element.
width of an element in pixels
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotElementWidth()).
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6468 of file SeleniumTestCaseDoc.php.
| verifyNotEval | ( | $script, | |
| $pattern | |||
| ) |
Assertion: Gets the result of evaluating the specified JavaScript snippet.
The snippet may have multiple lines, but only the result of the last line will be returned.
Note that, by default, the snippet will run in the context of the "selenium" object itself, so [this] will refer to the Selenium object. Use [window] to refer to the window of your application, e.g. [window.document.getElementById('foo')]
If you need to use a locator to refer to a single element in your application page, you can use [this.browserbot.findElement("id=foo")] where "id=foo" is your locator.
the results of evaluating the snippet
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotEval()).
| string | $script | the JavaScript snippet to run |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6758 of file SeleniumTestCaseDoc.php.
| verifyNotExpression | ( | $expression, | |
| $pattern | |||
| ) |
Assertion: Returns the specified expression.
This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.
the value passed in
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotExpression()).
| string | $expression | the value to return |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7028 of file SeleniumTestCaseDoc.php.
| verifyNotHtmlSource | ( | $pattern | ) |
Assertion: Returns the entire HTML source between the opening and closing "html" tags.
the entire HTML source
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotHtmlSource()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7261 of file SeleniumTestCaseDoc.php.
| verifyNotLocation | ( | $pattern | ) |
Assertion: Gets the absolute URL of the current page.
the absolute URL of the current page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotLocation()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7486 of file SeleniumTestCaseDoc.php.
| verifyNotMouseSpeed | ( | $pattern | ) |
Assertion: Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
the number of pixels between "mousemove" events during dragAndDrop commands (default=10)
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotMouseSpeed()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 7712 of file SeleniumTestCaseDoc.php.
| verifyNotOrdered | ( | $locator1, | |
| $locator2 | |||
| ) |
Assertion: Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotOrdered()).
| string | $locator1 | an element locator pointing to the first element (see Element Locators) |
| string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 7933 of file SeleniumTestCaseDoc.php.
| verifyNotPrompt | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotPrompt()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8211 of file SeleniumTestCaseDoc.php.
| verifyNotSelectedId | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedId()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8715 of file SeleniumTestCaseDoc.php.
| verifyNotSelectedIds | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIds()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8958 of file SeleniumTestCaseDoc.php.
| verifyNotSelectedIndex | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIndex()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9201 of file SeleniumTestCaseDoc.php.
| verifyNotSelectedIndexes | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedIndexes()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9449 of file SeleniumTestCaseDoc.php.
| verifyNotSelectedLabel | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedLabel()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9695 of file SeleniumTestCaseDoc.php.
| verifyNotSelectedLabels | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedLabels()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9941 of file SeleniumTestCaseDoc.php.
| verifyNotSelectedValue | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedValue()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10187 of file SeleniumTestCaseDoc.php.
| verifyNotSelectedValues | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectedValues()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10433 of file SeleniumTestCaseDoc.php.
| verifyNotSelectOptions | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSelectOptions()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8472 of file SeleniumTestCaseDoc.php.
| verifyNotSomethingSelected | ( | $selectLocator | ) |
Assertion: Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSomethingSelected()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10673 of file SeleniumTestCaseDoc.php.
| verifyNotSpeed | ( | $pattern | ) |
Assertion: Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotSpeed()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10911 of file SeleniumTestCaseDoc.php.
| verifyNotTable | ( | $tableCellAddress, | |
| $pattern | |||
| ) |
Assertion: Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotTable()).
| string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11161 of file SeleniumTestCaseDoc.php.
| verifyNotText | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotText()).
| string | $locator | an element locator (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11421 of file SeleniumTestCaseDoc.php.
| verifyNotTitle | ( | $pattern | ) |
Assertion: Gets the title of the current page.
the title of the current page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotTitle()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11661 of file SeleniumTestCaseDoc.php.
| verifyNotValue | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotValue()).
| string | $locator | an element locator (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11908 of file SeleniumTestCaseDoc.php.
| verifyNotVisible | ( | $locator | ) |
Assertion: Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotVisible()).
| string | $locator | an element locator (see Element Locators) |
Definition at line 12171 of file SeleniumTestCaseDoc.php.
| verifyNotWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
| $target | |||
| ) |
Assertion: Determine whether current/locator identify the frame containing this running code.
This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" frame. In this case, when the test calls selectFrame, this routine is called for each frame to figure out which one has been selected. The selected frame will return true, while all others will return false.
true if the new frame is this code's window
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotWhetherThisFrameMatchFrameExpression()).
| string | $currentFrameString | starting frame |
| string | $target | new frame (which might be relative to the current one) |
Definition at line 12442 of file SeleniumTestCaseDoc.php.
| verifyNotWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
| $target | |||
| ) |
Assertion: Determine whether currentWindowString plus target identify the window containing this running code.
This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" window. In this case, when the test calls selectWindow, this routine is called for each window to figure out which one has been selected. The selected window will return true, while all others will return false.
true if the new window is this code's window
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotWhetherThisWindowMatchWindowExpression()).
| string | $currentWindowString | starting window |
| string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12719 of file SeleniumTestCaseDoc.php.
| verifyNotXpathCount | ( | $xpath, | |
| $pattern | |||
| ) |
Assertion: Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath
If assertion will fail the test, it will continue to run the test case (in contrast to the assertNotXpathCount()).
| string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 12976 of file SeleniumTestCaseDoc.php.
| verifyOrdered | ( | $locator1, | |
| $locator2 | |||
| ) |
Assertion: Check if these two elements have same parent and are ordered siblings in the DOM.
Two same elements will not be considered ordered.
true if element1 is the previous sibling of element2, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertOrdered()).
| string | $locator1 | an element locator pointing to the first element (see Element Locators) |
| string | $locator2 | an element locator pointing to the second element (see Element Locators) |
Definition at line 7967 of file SeleniumTestCaseDoc.php.
| verifyPrompt | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.
NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
the message of the most recent JavaScript question prompt
If assertion will fail the test, it will continue to run the test case (in contrast to the assertPrompt()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8249 of file SeleniumTestCaseDoc.php.
| verifyPromptNotPresent | ( | ) |
Assertion: Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt
If assertion will fail the test, it will continue to run the test case (in contrast to the assertPromptNotPresent()).
Definition at line 13211 of file SeleniumTestCaseDoc.php.
| verifyPromptPresent | ( | ) |
Assertion: Has a prompt occurred?
This function never throws an exception .
true if there is a pending prompt
If assertion will fail the test, it will continue to run the test case (in contrast to the assertPromptPresent()).
Definition at line 13240 of file SeleniumTestCaseDoc.php.
| verifySelectedId | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets option element ID for selected option in the specified select element.
the selected option ID in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedId()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8747 of file SeleniumTestCaseDoc.php.
| verifySelectedIds | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option element IDs for selected options in the specified select or multi-select element.
an array of all selected option IDs in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIds()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8990 of file SeleniumTestCaseDoc.php.
| verifySelectedIndex | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets option index (option number, starting at 0) for selected option in the specified select element.
the selected option index in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIndex()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9233 of file SeleniumTestCaseDoc.php.
| verifySelectedIndexes | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
an array of all selected option indexes in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedIndexes()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9482 of file SeleniumTestCaseDoc.php.
| verifySelectedLabel | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets option label (visible text) for selected option in the specified select element.
the selected option label in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedLabel()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9727 of file SeleniumTestCaseDoc.php.
| verifySelectedLabels | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option labels (visible text) for selected options in the specified select or multi-select element.
an array of all selected option labels in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedLabels()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 9974 of file SeleniumTestCaseDoc.php.
| verifySelectedValue | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets option value (value attribute) for selected option in the specified select element.
the selected option value in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedValue()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10219 of file SeleniumTestCaseDoc.php.
| verifySelectedValues | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option values (value attributes) for selected options in the specified select or multi-select element.
an array of all selected option values in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectedValues()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10466 of file SeleniumTestCaseDoc.php.
| verifySelectOptions | ( | $selectLocator, | |
| $pattern | |||
| ) |
Assertion: Gets all option labels in the specified select drop-down.
an array of all option labels in the specified select drop-down
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSelectOptions()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 8504 of file SeleniumTestCaseDoc.php.
| verifySomethingSelected | ( | $selectLocator | ) |
Assertion: Determines whether some option in a drop-down menu is selected.
true if some option has been selected, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSomethingSelected()).
| string | $selectLocator | an element locator identifying a drop-down menu (see Element Locators) |
Definition at line 10703 of file SeleniumTestCaseDoc.php.
| verifySpeed | ( | $pattern | ) |
Assertion: Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).
By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed.
the execution speed in milliseconds.
If assertion will fail the test, it will continue to run the test case (in contrast to the assertSpeed()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 10944 of file SeleniumTestCaseDoc.php.
| verifyTable | ( | $tableCellAddress, | |
| $pattern | |||
| ) |
Assertion: Gets the text from a cell of a table.
The cellAddress syntax tableLocator.row.column, where row and column start at 0.
the text from the specified cell
If assertion will fail the test, it will continue to run the test case (in contrast to the assertTable()).
| string | $tableCellAddress | a cell address, e.g. "foo.1.4" |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11194 of file SeleniumTestCaseDoc.php.
| verifyText | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Gets the text of an element.
This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user.
the text of the element
If assertion will fail the test, it will continue to run the test case (in contrast to the assertText()).
| string | $locator | an element locator (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11456 of file SeleniumTestCaseDoc.php.
| verifyTextNotPresent | ( | $pattern | ) |
Assertion: Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertTextNotPresent()).
| string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13439 of file SeleniumTestCaseDoc.php.
| verifyTextPresent | ( | $pattern | ) |
Assertion: Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
true if the pattern matches the text, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertTextPresent()).
| string | $pattern | a pattern to match with the text of the page (see String match Patterns) |
Definition at line 13469 of file SeleniumTestCaseDoc.php.
| verifyTitle | ( | $pattern | ) |
Assertion: Gets the title of the current page.
the title of the current page
If assertion will fail the test, it will continue to run the test case (in contrast to the assertTitle()).
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11691 of file SeleniumTestCaseDoc.php.
| verifyValue | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not.
the element value, or "on/off" for checkbox/radio elements
If assertion will fail the test, it will continue to run the test case (in contrast to the assertValue()).
| string | $locator | an element locator (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 11942 of file SeleniumTestCaseDoc.php.
| verifyVisible | ( | $locator | ) |
Assertion: Determines if the specified element is visible.
An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present.
true if the specified element is visible, false otherwise
If assertion will fail the test, it will continue to run the test case (in contrast to the assertVisible()).
| string | $locator | an element locator (see Element Locators) |
Definition at line 12205 of file SeleniumTestCaseDoc.php.
| verifyWhetherThisFrameMatchFrameExpression | ( | $currentFrameString, | |
| $target | |||
| ) |
Assertion: Determine whether current/locator identify the frame containing this running code.
This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" frame. In this case, when the test calls selectFrame, this routine is called for each frame to figure out which one has been selected. The selected frame will return true, while all others will return false.
true if the new frame is this code's window
If assertion will fail the test, it will continue to run the test case (in contrast to the assertWhetherThisFrameMatchFrameExpression()).
| string | $currentFrameString | starting frame |
| string | $target | new frame (which might be relative to the current one) |
Definition at line 12478 of file SeleniumTestCaseDoc.php.
| verifyWhetherThisWindowMatchWindowExpression | ( | $currentWindowString, | |
| $target | |||
| ) |
Assertion: Determine whether currentWindowString plus target identify the window containing this running code.
This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" window. In this case, when the test calls selectWindow, this routine is called for each window to figure out which one has been selected. The selected window will return true, while all others will return false.
true if the new window is this code's window
If assertion will fail the test, it will continue to run the test case (in contrast to the assertWhetherThisWindowMatchWindowExpression()).
| string | $currentWindowString | starting window |
| string | $target | new window (which might be relative to the current one, e.g., "_parent") |
Definition at line 12755 of file SeleniumTestCaseDoc.php.
| verifyXpathCount | ( | $xpath, | |
| $pattern | |||
| ) |
Assertion: Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
the number of nodes that match the specified xpath
If assertion will fail the test, it will continue to run the test case (in contrast to the assertXpathCount()).
| string | $xpath | the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 13009 of file SeleniumTestCaseDoc.php.
| waitForAlert | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.
Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.
Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.
The message of the most recent JavaScript alert
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 672 of file SeleniumTestCaseDoc.php.
| waitForAlertNotPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 905 of file SeleniumTestCaseDoc.php.
| waitForAlertPresent | ( | ) |
Assertion: Has an alert occurred?
This function never throws an exception .
true if there is an alert
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 935 of file SeleniumTestCaseDoc.php.
| waitForAllButtons | ( | $pattern | ) |
Assertion: Returns the IDs of all buttons on the page.
If a given button has no ID, it will appear as "" in this array.
the IDs of all buttons on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1143 of file SeleniumTestCaseDoc.php.
| waitForAllFields | ( | $pattern | ) |
Assertion: Returns the IDs of all input fields on the page.
If a given field has no ID, it will appear as "" in this array.
the IDs of all field on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1384 of file SeleniumTestCaseDoc.php.
| waitForAllLinks | ( | $pattern | ) |
Assertion: Returns the IDs of all links on the page.
If a given link has no ID, it will appear as "" in this array.
the IDs of all links on the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1625 of file SeleniumTestCaseDoc.php.
| waitForAllWindowIds | ( | $pattern | ) |
Assertion: Returns the IDs of all windows that the browser knows about in an array.
Array of identifiers of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 1853 of file SeleniumTestCaseDoc.php.
| waitForAllWindowNames | ( | $pattern | ) |
Assertion: Returns the names of all windows that the browser knows about in an array.
Array of names of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2079 of file SeleniumTestCaseDoc.php.
| waitForAllWindowTitles | ( | $pattern | ) |
Assertion: Returns the titles of all windows that the browser knows about in an array.
Array of titles of all windows that the browser knows about.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2305 of file SeleniumTestCaseDoc.php.
| waitForAttribute | ( | $attributeLocator, | |
| $pattern | |||
| ) |
Assertion: Gets the value of an element attribute.
The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example).
the value of the specified attribute
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $attributeLocator | an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2559 of file SeleniumTestCaseDoc.php.
| waitForAttributeFromAllWindows | ( | $attributeName, | |
| $pattern | |||
| ) |
Assertion: Returns an array of JavaScript property values from all known windows having one.
the set of values of this attribute from all known windows.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $attributeName | name of an attribute on the windows |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 2803 of file SeleniumTestCaseDoc.php.
| waitForBodyText | ( | $pattern | ) |
Assertion: Gets the entire text of the page.
the entire text of the page
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3030 of file SeleniumTestCaseDoc.php.
| waitForChecked | ( | $locator | ) |
Assertion: Gets whether a toggle-button (checkbox/radio) is checked.
Fails if the specified element doesn't exist or isn't a toggle-button.
true if the checkbox is checked, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator pointing to a checkbox or radio button (see Element Locators) |
Definition at line 3274 of file SeleniumTestCaseDoc.php.
| waitForCondition | ( | $script, | |
| $timeout | |||
| ) |
Runs the specified JavaScript snippet repeatedly until it evaluates to "true".
The snippet may have multiple lines, but only the result of the last line will be considered.
Note that, by default, the snippet will be run in the runner's test window, not in the window of your application. To get the window of your application, you can use the JavaScript snippet [selenium.browserbot.getCurrentWindow()], and then run your JavaScript in there.
| string | $script | the JavaScript snippet to run |
| string | $timeout | a timeout in milliseconds, after which this command will return with an error |
Definition at line 16326 of file SeleniumTestCaseDoc.php.
| waitForConfirmation | ( | $pattern | ) |
Assertion: Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.
NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.
NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
the message of the most recent JavaScript confirmation dialog
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 3586 of file SeleniumTestCaseDoc.php.
| waitForConfirmationNotPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 3822 of file SeleniumTestCaseDoc.php.
| waitForConfirmationPresent | ( | ) |
Assertion: Has confirm() been called?
This function never throws an exception .
true if there is a pending confirmation
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
Definition at line 3852 of file SeleniumTestCaseDoc.php.
| waitForCookie | ( | $pattern | ) |
Assertion: Return all cookies of the current page under test.
all cookies of the current page under test
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4046 of file SeleniumTestCaseDoc.php.
| waitForCookieByName | ( | $name, | |
| $pattern | |||
| ) |
Assertion: Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
the value of the cookie
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $name | the name of the cookie |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4284 of file SeleniumTestCaseDoc.php.
| waitForCookieNotPresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $name | the name of the cookie |
Definition at line 4510 of file SeleniumTestCaseDoc.php.
| waitForCookiePresent | ( | $name | ) |
Assertion: Returns true if a cookie with the specified name is present, or false otherwise.
true if a cookie with the specified name is present, or false otherwise.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $name | the name of the cookie |
Definition at line 4540 of file SeleniumTestCaseDoc.php.
| waitForCursorPosition | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.
This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
the numerical position of the cursor in the field
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator pointing to an input element or textarea (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 4791 of file SeleniumTestCaseDoc.php.
| waitForEditable | ( | $locator | ) |
Assertion: Determines whether the specified input element is editable, ie hasn't been disabled.
This method will fail if the specified element isn't an input element.
true if the input element is editable, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator (see Element Locators) |
Definition at line 5044 of file SeleniumTestCaseDoc.php.
| waitForElementHeight | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the height of an element.
height of an element in pixels
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5286 of file SeleniumTestCaseDoc.php.
| waitForElementIndex | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Get the relative index of an element to its parent (starting from 0).
The comment node and empty text node will be ignored.
of relative index of the element to its parent (starting from 0)
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator pointing to an element (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 5543 of file SeleniumTestCaseDoc.php.
| waitForElementNotPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator (see Element Locators) |
Definition at line 5777 of file SeleniumTestCaseDoc.php.
| waitForElementPositionLeft | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the horizontal position of an element.
of pixels from the edge of the frame.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6017 of file SeleniumTestCaseDoc.php.
| waitForElementPositionTop | ( | $locator, | |
| $pattern | |||
| ) |
Assertion: Retrieves the vertical position of an element.
of pixels from the edge of the frame.
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator pointing to an element OR an element itself (see Element Locators) |
| string | $pattern | the String-match Patterns (see String match Patterns) |
Definition at line 6259 of file SeleniumTestCaseDoc.php.
| waitForElementPresent | ( | $locator | ) |
Assertion: Verifies that the specified element is somewhere on the page.
true if the element is present, false otherwise
This command wait for some condition to become true (or returned value is equal specified value).
This command will succeed immediately if the condition is already true.
| string | $locator | an element locator (see Element Locators) |