Basic Steps
Click
Clicks the element.
Uses the WebElement.click() Selenium API.
Go to URL
Directs the browser to load url.
Uses the WebDriver.navigate().goto() Selenium API.
Move mouse to…
Moves the mouse to element.
Uses Actions.moveToElement() Selenium API.
Open Browser
Opens browser using provider. See Selenium section for details on configuring browsers and browser providers. This creates a WebDriver, which is stored in the execution context - making it available to all Selenium steps (including in functions and scoped groups).
Optional parameters:
- Auto close - if true (default), close the browser and shutdown the driver when the task ends.
Send Keys
Send keys to element.
Optional parameters:
- Clear content - if true, the field is cleared prior to sending keys.
Uses WebElement.sendKeys() and WebElement.clear() Selenium Action APIs.
Submit
Submit the form element or the form containing element.
Uses WebElement.submit() Selenium API.
Dialog Steps
Accept Dialog
Accepts the current dialog (aka alert). If an alert is not present, the step will fail.
Uses the WebDriver.switchTo().alert().accept() Selenium API.
Cancel Dialog
Cancels the current dialog (aka alert). If an alert is not present, the step will fail.
Uses the WebDriver.switchTo().alert().cancel() Selenium API.
Send Keys to Dialog
Sends keys to the current dialog (aka alert). If an alert is not present, the step will fail.
Uses the WebDriver.switchTo().alert().sendkeys() Selenium API.
Frame Steps
Switch to Frame
Switches the WebDriver to the target frame. Target can be:
- element (an element value source)
- integer (the Nth frame on the page (0-based index)
- string (the name or id of the frame)
Uses the WebDriver.switchTo().frame() Selenium API.
Switch to Parent Frame
Switches the WebDriver to the frame that is the parent of the current frame.
Uses the WebDriver.switchTo().parentFrame() API.
Switch to Top Frame
Switches the WebDriver to the top frame in the context.
Uses the WebDriver.switchTo().defaultContext() API.
Navigate Steps
Back
Navigate to the previous page (if there is one).
Uses the WebDriver.navigate().back() Selenium API.
Forward
Navigate to the next page (if navigate back was previously used.
Uses the WebDriver.navigate().forward() Selenium API.
Refresh
Refresh the current page.
Uses the WebDriver.navigate().refresh() Selenium API.
Other Steps
Capture DOM
Captures the state of the DOM starting with element and stores it.
Also raises a TaskResultStored event. This allows a plugin (such as the TaskResultsSaver) to save the DOM capture to disk (as a JSON file, dom-capture.json by default).
Clear
Clears the content of the element (if it is a text-entry element).
Uses the WebElement.clear() Selenium API.
Execute Javascript
Evaluates script in the context of the page.
Optional parameters:
- arguments - a list of arguments to pass into the script
- return variable - name of the variable to store the value returned from the script (if any)
Uses the JavascriptExecutor.executeScript() Selenium API.
Select Steps
These steps operate on Select elements (i.e. <select>, <option>)
Select or deselect by index
Selects (or de-selects) an option from element based on the index.
Select or deselect by option value
Selects (or de-selects) an option from element based on the option value.
Select or deselect by visible text
Selects (or de-selects) an option from element based on the option visible text.
Window Steps
Browser position
Moves the browser to (x, y).
Uses the WebDriver.manage().window().setPosition() Selenium API.
Browser Size
Resizes the browser to (width, height).
Uses the WebDriver.manage().window().setSize() Selenium API.
Capture new window
A compound step that will capture the handle of a new window created by child steps and store it in a variable. That handle can be used by the Switch to Window step later, to switch back to the window.
Optional parameters:
- Window Handle - name of the variable to store the handle in (default is _window_handle)
Uses the WebDriver.getWindowHandles() Selenium API.
Close browser
Closes the current browser (all windows).
Uses the WebDriver.quit() Selenium API.
Full screen
Switches the browser into full-screen mode.
Uses the WebDriver..manage().window().fullscreen() Selenium API.
Maximize
Maximizes the browser window.
Uses the WebDriver..manage().window().maximize() Selenium API.
Open new window
Attempts to open a new browser window and capture the window handle.
Optional parameters:
- Window Handle - name of the variable to store the handle in (default is _window_handle)
- Script - script to execute to open the window (default is window.open())
Switch to window
Switches to a window/tab with id or name target.
Uses the WebDriver.switchTo().window() Selenium API.