[Selenium] element index

Package indexes

All elements
a c d f g h i k m o r s t u w _
_
top
__construct
Constructor
a
top
addLocationStrategy
Defines a new function for Selenium to locate elements on the page.
addSelection
Add a selection to the set of selected options in a multi-select element using an option locator.
allowNativeXpath
Specifies whether Selenium should use the native in-browser implementation of XPath (if any native version is available); if you pass "false" to this function, we will always use our pure-JavaScript xpath library.
altKeyDown
Press the alt key and hold it down until doAltUp() is called or a new page is loaded.
altKeyUp
Release the alt key.
answerOnNextPrompt
Instructs Selenium to return the specified answer string in response to the next JavaScript prompt [window.prompt()].
assignId
Temporarily sets the "id" attribute of the specified element, so you can locate it in the future using its ID rather than a slow/complicated XPath. This ID will disappear once the page is reloaded.
attachFile
Sets a file input (upload) field to the file listed in fileLocator
c
top
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.
d
top
deleteAllVisibleCookies
Calls deleteCookie with recurse=true on all cookies visible to the current page.
deleteCookie
Delete a named cookie with specified path and domain. Be careful; to delete a cookie, you need to delete it using the exact same path and domain that were used to create the cookie.
doCommand
doubleClick
Double clicks on a link, button, checkbox or radio button. If the double click action causes a new page to load (like a link usually does), call waitForPageToLoad.
doubleClickAt
Doubleclicks on a link, button, checkbox or radio button. If the action causes a new page to load (like a link usually does), call waitForPageToLoad.
dragAndDrop
Drags an element a certain distance and then drops it
dragAndDropToObject
Drags an element and drops it on another element
dragdrop
deprecated - use dragAndDrop instead
f
top
fireEvent
Explicitly simulate an event, to trigger the corresponding "onevent" handler.
focus
Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field.
g
top
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.
h
top
highlight
Briefly changes the backgroundColor of the specified element yellow. Useful for debugging.
i
top
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
k
top
keyDown
Simulates a user pressing a key (without releasing it yet).
keyDownNative
Simulates a user pressing a key (without releasing it yet) by sending a native operating system keystroke.
keyPress
Simulates a user pressing and releasing a key.
keyPressNative
Simulates a user pressing and releasing a key by sending a native operating system keystroke.
keyUp
Simulates a user releasing a key.
keyUpNative
Simulates a user releasing a key by sending a native operating system keystroke.
m
top
metaKeyDown
Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.
metaKeyUp
Release the meta key.
mouseDown
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
mouseDownAt
Simulates a user pressing the mouse button (without releasing it yet) at the specified location.
mouseMove
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
mouseMoveAt
Simulates a user pressing the mouse button (without releasing it yet) on the specified element.
mouseOut
Simulates a user moving the mouse pointer away from the specified element.
mouseOver
Simulates a user hovering a mouse over the specified element.
mouseUp
Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) on the specified element.
mouseUpAt
Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) at the specified location.
o
top
open
Testing_Selenium::open() in Selenium.php
Opens an URL in the test frame. This accepts both relative and absolute URLs.
openWindow
Opens a popup window (if a window with that ID isn't already open).
r
top
refresh
Simulates the user clicking the "Refresh" button on their browser.
removeAllSelections
Unselects all of the selected options in a multi-select element.
removeSelection
Remove a selection from the set of selected options in a multi-select element using an option locator.
runScript
Creates a new "script" tag in the body of the current test window, and
s
top
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
Selenium.php in 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
Testing_Selenium::stop() in Selenium.php
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.
t
top
Testing_Selenium
Testing_Selenium in Selenium.php
Defines an object that runs Selenium commands.
type
Testing_Selenium::type() in Selenium.php
Sets the value of an input field, as though you typed it in.
typeKeys
Simulates keystroke events on the specified element, as though you typed the value key-by-key.
u
top
uncheck
Uncheck a toggle-button (checkbox/radio)
w
top
waitForCondition
Runs the specified JavaScript snippet repeatedly until it evaluates to "true".
waitForFrameToLoad
Waits for a new frame to load.
waitForPageToLoad
Waits for a new page to load.
waitForPopUp
Waits for a popup window to appear and load up.
windowFocus
Gives focus to the currently selected window
windowMaximize
Resize currently selected window to take up the entire screen
a c d f g h i k m o r s t u w _