Target Commands

target.type

Focuses the element, and then sends keyboard events for each character in the text

target.select

Sets value on select element

target.focus

Focuses the element

target.click

Emulates mouse click on the element

target.reset

Resets the input or form element

target.upload

Sets the value of a file input. Note that the target element must be INPUT of FILE type. It is also recommended to emulate click on the target (or clickable element calling the file browser) before going with this command

Since ver. 3.2.6 file path supports template expressions. So you can use e.g. environment variables to build the path.

Alternatively you can specify with in advanced options file size and name and it will be generated and attached to the file input element.

target.tap

Taps the element

target.scroll

Sets the number of pixels that an element's content is scrolled horizontally/vertically.

target.scrollIntoView

Scrolls element into view.

target.hover

Scrolls element into view if needed, and then hovers over the center of the element

target.checkBox

Toggles checkbox/radio state

target.toggleClass

Toggles the specified class value (adds or removes)

target.setAttribute

Sets the value of an attribute on a target

target.screenshot

Takes a screenshot of the target element.

target.waitForTarget

Waits for an element matching a provided target to appear in page.

Last updated