Navigation/DOM Interaction
navigate
Navigates the browser to the provided URL and waits for it to complete.
Browser Support: IE, Chrome, Firefox, Safari
usage: navigate <url>
example: navigate http://webmail.aol.com
<url> - URL to provide the browser for navigation (same as you would enter into the address bar)
click
Triggers a click event for the identified DOM element. This version does not have an implied wait and the script will continue running after the event is submitted (see clickAndWait for the wait version).
Browser Support: IE, Chrome, Firefox
usage: click <wpt-selector>
example: click title=Delete
<wpt-selector> - DOM element to click on
clickAndWait
Triggers a click event for the identified DOM element and subsequently waits for browser activity to complete.
Browser Support: IE, Chrome, Firefox
usage: clickAndWait <wpt-selector>
example: clickAndWait innerText=Send
<wpt-selector> - DOM element to click on
For the list of supported selectors, see Selectors.
selectValue
Selects a value from a dropdown list of the given DOM element.
Browser Support: IE
usage: selectValue <wpt-selector> <value>
example: selectValue id=country usa
<wpt-selector> - DOM element to select the value of
<value> \*\*- value to use
For the list of supported selectors, see Selectors.
sendClick / sendClickAndWait
Creates a JavaScript onclick event and sends it to the indicated element.
Browser Support: IE
usage: sendClickAndWait <wpt-selector>
example: sendClickAndWait innerText=Send
<wpt-selector> - DOM element to send the click event to
For the list of supported selectors, see Selectors.
For the difference between sendClick and sendClickAndWait, see click and clickAndWait.
type / typeAndWait
Simulate keyboard keypresses for each character in the given string.
Browser Support: Chrome
usage: type <string>
example: type Hello World
<string> - String of characters to type into the keyboard.
For the difference between type and typeAndWait, see click and clickAndWait.
keypress / keypressAndWait
Simulate a keyboard keypress for the given key.
Browser Support: Chrome
usage: keypress <key>
example: keypress Enter
<key> - Keyboard key to simulate pressing.
Full list of supported keys is here .
For the difference between keypress and keypressAndWait, see click and clickAndWait.
setInnerHTML
Sets the innerHTML of the given DOM element to the provided value. This is usually used for filling in something like an editable HTML panel (like the message body in webmail). Use this if you want to include HTML formatting.
Browser Support: IE, Chrome, Firefox
usage: setInnerHTML <wpt-selector> <value>
example: setInnerHTML contentEditable'true %MSG%
<wpt-selector> - DOM element to set the innerText of
<value> - value to use
For the list of supported selectors, see Selectors.
setInnerText
Sets the innerText of the given DOM element to the provided value. This is usually used for filling in something like an editable HTML panel (like the message body in webmail). Use this if you don't want to include any HTML formatting.
Browser Support: IE, Chrome, Firefox
usage: setInnerText <wpt-selector> <value>
example: setInnerText contentEditable'true %MSG%
<wpt-selector> - DOM element to set the innerText of
<value> - value to use
For the list of supported selectors, see Selectors.
setValue
Sets the value attribute of the given DOM element to the provided value. This is usually used for filling in text elements on a page (forms or otherwise). Currently only input and textArea element types are supported.
Browser Support: IE, Chrome, Firefox
usage: setValue <wpt-selector> <value>
example: setValue name=loginId userName
<wpt-selector> - DOM element to set the value of
<value> - value to use
For the list of supported selectors, see Selectors.
submitForm
Triggers a submit event for the identified form.
Browser Support: IE, Chrome, Firefox
usage: submitForm <wpt-selector>
example: submitForm name=AOLLoginForm
<wpt-selector> - Form element to submit
For the list of supported selectors, see Selectors.
exec
Executes JavaScript.
Browser Support: IE, Chrome, Firefox
usage: exec <JavaScript code>
example: exec window.setInterval('window.scrollBy(0,600)', 1000);
execAndWait
execAndWait
Executes JavaScript and waits for the browser to complete any activity generated from the action.
Browser Support: IE, Chrome, Firefox
usage: execAndWait <JavaScript code>
example: execAndWait window.setInterval('window.scrollBy(0,600)', 1000);
Updated about 1 month ago