Beruflich Dokumente
Kultur Dokumente
Open a URL in test frame open ( url ) url - the URL to open; may be relative or absolute.
Refresh the browser refresh ( ) Simulates the user clicking the "Refresh" button on their browser.
Textfields, text area type ( locator,value ) 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.
* locator - an element locator
* value - the value to type
Submitting form submit ( formLocator ) Submit the specified form. This is particularly useful for forms without submit buttons,
e.g. single-input "Search" forms.
* formLocator - an element locator for the form you want to submit.
Firing an event fireEvent ( locator,eventName ) Explicitly simulate an event, to trigger the corresponding "onevent" handler.
* locator - an element locator
* eventName - the event name, e.g. "focus" or "blur".
Wait for Page to load waitForPageToLoad ( timeout ) Waits for a new page to load.
* timeout - a timeout in milliseconds, after which this returns with an error.
Timeout setTimeout ( timeout ) Specifies the amount of time that Selenium will wait for actions to complete.
Actions that require waiting include "open" and the "waitFor*" actions.
The default timeout is 30 seconds.
* timeout - a timeout in milliseconds, after which the action will return with n error
Browser go back goBack ( ) Simulates the user clicking the "back" button on their browser
closing popup or tab close ( ) Simulates the user clicking the "close" button in the titlebar of a popup window or tab.
Select Frame selectFrame ( locator ) Selects a frame within the current window.
* locator - an element locator identifying a frame or iframe
Select Window selectWindow ( windowID ) once a popup window has been selected, all commands go to that window. To select the
main window again, use "null" as the target.
* windowID - the JavaScript window ID of the window to select
For logging setContext ( context,logLevelThreshold ) Writes a message to the status bar and adds a note to the browser-side log.
If logLevelThreshold is specified, set the threshold for logging to that level (debug, info,
warn, error). (Note that the browser-side logs will not be sent back to the server, and are
invisible to the Client Driver.)
Arguments:
* context - the message to be sent to the browser
* logLevelThreshold - one of "debug", "info", "warn", "error", sets the threshold for
browser-side logging
Set cursor setCursorPosition ( locator,position ) * locator - an element locator pointing to an input element or textarea
* 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.
Simulates a user pressing a key keyDown ( locator,keySequence ) * locator - an element locator For example: "w", "\119".
(without releasing it yet). * keySequence - Either be a string("\" followed by the numeric keycode of the key to
be pressed, the ASCII value of that key), or a single character.
Simulates a user pressing keyPress ( locator,keySequence ) * locator - an element locator For example: "w", "\119".
and releasing a key. * keySequence - Either be a string("\" followed by the numeric keycode of the key to
be pressed, the ASCII value of that key), or a single character.
Simulates a user releasing keyUp ( locator,keySequence ) * locator - an element locator For example: "w", "\119".
a key. * keySequence - Either be a string("\" followed by the numeric keycode of key to be
pressed, the ASCII value of key), or a single character.
Create Cookie createCookie * nameValuePair - name and value of the cookie "name=value" format
( nameValuePair,optionsString ) * optionsString - options for the cookie. Currently supported options include 'path' and
'max_age'. the optionsString's format is "path=/path/, max_age=60". The order of
options are irrelevant, unit of 'max_age' is sec.
Delete Cookie deleteCookie ( name,path ) * name - the name of the cookie to be deleted
* path - the path property of the cookie to be deleted.
Drag and drop dragdrop ( locator,movementsString ) * locator - an element locator
* movementsString - offset in pixels from the current location to which the element
should be moved, e.g., "+70,-300"
Wait for condition using waitForCondition ( script,timeout ) Runs the JavaScript snippet repeatedly until it evaluates to "true". snippet may have
the javascript snippet multiple lines, but only result of last line will be considered.
* script - the JavaScript snippet to run
* timeout - a timeout in milliseconds, after this returns with an error.
Wait for Popup waitForPopUp ( windowID,timeout ) Waits for a popup window to appear and load up.
* windowID - the JavaScript window ID of the window that will appear
* timeout - a timeout in milliseconds, after this action returns an error