-
captureEntirePageScreenshot
-
Saves the entire contents of the current window canvas to a PNG file.
-
captureScreenshot
-
Captures a PNG screenshot to the specified file.
-
check
-
Check a toggle-button (checkbox/radio)
-
chooseCancelOnNextConfirmation
-
By default, Selenium's overridden window.confirm() function will
-
chooseOkOnNextConfirmation
-
Undo the effect of calling chooseCancelOnNextConfirmation. Note
-
click
-
Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
-
clickAt
-
Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad.
-
close
-
Simulates the user clicking the "close" button in the titlebar of a popup window or tab.
-
contextMenu
-
Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
-
contextMenuAt
-
Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element).
-
controlKeyDown
-
Press the control key and hold it down until doControlUp() is called or a new page is loaded.
-
controlKeyUp
-
Release the control key.
-
createCookie
-
Create a new cookie whose path and domain are same with those of current page under test, unless you specified a path for this cookie explicitly.
-
getAlert
-
Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
-
getAllButtons
-
Returns the IDs of all buttons on the page.
-
getAllFields
-
Returns the IDs of all input fields on the page.
-
getAllLinks
-
Returns the IDs of all links on the page.
-
getAllWindowIds
-
Returns the IDs of all windows that the browser knows about.
-
getAllWindowNames
-
Returns the names of all windows that the browser knows about.
-
getAllWindowTitles
-
Returns the titles of all windows that the browser knows about.
-
getAttribute
-
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).
-
getAttributeFromAllWindows
-
Returns every instance of some attribute from all known windows.
-
getBodyText
-
Gets the entire text of the page.
-
getConfirmation
-
Retrieves the message of a JavaScript confirmation dialog generated during the previous action.
-
getCookie
-
Return all cookies of the current page under test.
-
getCookieByName
-
Returns the value of the cookie with the specified name, or throws an error if the cookie is not present.
-
getCursorPosition
-
Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
-
getElementHeight
-
Retrieves the height of an element
-
getElementIndex
-
Get the relative index of an element to its parent (starting from 0). The comment node and empty text node will be ignored.
-
getElementPositionLeft
-
Retrieves the horizontal position of an element
-
getElementPositionTop
-
Retrieves the vertical position of an element
-
getElementWidth
-
Retrieves the width of an element
-
getEval
-
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.
-
getExpression
-
Returns the specified expression.
-
getHtmlSource
-
Returns the entire HTML source between the opening and closing "html" tags.
-
getLocation
-
Gets the absolute URL of the current page.
-
getMouseSpeed
-
Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
-
getPrompt
-
Retrieves the message of a JavaScript question prompt dialog generated during the previous action.
-
getSelectedId
-
Gets option element ID for selected option in the specified select element.
-
getSelectedIds
-
Gets all option element IDs for selected options in the specified select or multi-select element.
-
getSelectedIndex
-
Gets option index (option number, starting at 0) for selected option in the specified select element.
-
getSelectedIndexes
-
Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
-
getSelectedLabel
-
Gets option label (visible text) for selected option in the specified select element.
-
getSelectedLabels
-
Gets all option labels (visible text) for selected options in the specified select or multi-select element.
-
getSelectedValue
-
Gets option value (value attribute) for selected option in the specified select element.
-
getSelectedValues
-
Gets all option values (value attributes) for selected options in the specified select or multi-select element.
-
getSelectOptions
-
Gets all option labels in the specified select drop-down.
-
getSpeed
-
Get execution speed (i.e., get the millisecond length of the delay following each selenium operation). By default, there is no such delay, i.e., the delay is 0 milliseconds.
-
getTable
-
Gets the text from a cell of a table. The cellAddress syntax tableLocator.row.column, where row and column start at 0.
-
getText
-
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.
-
getTitle
-
Gets the title of the current page.
-
getValue
-
Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
-
getWhetherThisFrameMatchFrameExpression
-
Determine whether current/locator identify the frame containing this running code.
-
getWhetherThisWindowMatchWindowExpression
-
Determine whether currentWindowString plus target identify the window containing this running code.
-
getXpathCount
-
Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables.
-
goBack
-
Simulates the user clicking the "back" button on their browser.
-
ignoreAttributesWithoutValue
-
Specifies whether Selenium will ignore xpath attributes that have no value, i.e. are the empty string, when using the non-native xpath evaluation engine. You'd want to do this for performance reasons in IE.
-
isAlertPresent
-
Has an alert occurred?
-
isChecked
-
Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button.
-
isConfirmationPresent
-
Has confirm() been called?
-
isCookiePresent
-
Returns true if a cookie with the specified name is present, or false otherwise.
-
isEditable
-
Determines whether the specified input element is editable, ie hasn't been disabled.
-
isElementPresent
-
Verifies that the specified element is somewhere on the page.
-
isOrdered
-
Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will not be considered ordered.
-
isPromptPresent
-
Has a prompt occurred?
-
isSomethingSelected
-
Determines whether some option in a drop-down menu is selected.
-
isTextPresent
-
Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
-
isVisible
-
Determines if the specified element is visible. An
-
select
-
Select an option from a drop-down using an option locator.
-
selectFrame
-
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".
-
selectWindow
-
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.
-
Selenium.php
-
-
setBrowserLogLevel
-
Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
-
setContext
-
Writes a message to the status bar and adds a note to the browser-side log.
-
setCursorPosition
-
Moves the text cursor to the specified position in the given input element or textarea.
-
setMouseSpeed
-
Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10).
-
setSpeed
-
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.
-
setTimeout
-
Specifies the amount of time that Selenium will wait for actions to complete.
-
shiftKeyDown
-
Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
-
shiftKeyUp
-
Release the shift key.
-
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.
-
start
-
Run the browser and set session id.
-
stop
-
Close the browser and set session id null
-
submit
-
Submit the specified form. This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms.