Skip to main content
Specify exactly one from* target and one to* target. Use the description form (from, to) for stable elements, or coordinates (fromCoords, toCoords) for free-form drags such as Retool canvases.

Parameters

ParameterTypeRequiredDescription
fromstringNoDescription of the start element.
tostringNoDescription of the drop element.
fromCssstringNoCSS selector for the start element.
toCssstringNoCSS selector for the drop element.
fromCoordsstring | { x, y }NoAbsolute coordinates for the start point. Either x, y string or { x, y } object.
toCoordsstring | { x, y }NoAbsolute coordinates for the drop point. Either x, y string or { x, y } object.
fromXnumber | stringNoX coordinate of the start point. Use with fromY.
fromYnumber | stringNoY coordinate of the start point. Use with fromX.
toXnumber | stringNoX coordinate of the drop point. Use with toY.
toYnumber | stringNoY coordinate of the drop point. Use with toX.
stepsnumberNoNumber of mouse-move steps between start and drop.
hovernumberNoMilliseconds to hover before releasing.
forcebooleanNoForce the drag even when elements appear non-actionable.
iframestringNoURL or URL pattern of the iframe that contains the target element.
saveAsstringNoName of the variable to write this step’s return value to.
retriesnumberNoNumber of times to retry the step on failure before failing the test.
skippedbooleanNoSkip this step at execution time.

Examples

- dragAndDrop:
    from: the button component image on the left pane
    to: the main canvas
- dragAndDrop:
    fromCoords: 120, 240
    toCoords: 540, 380
    steps: 10
- dragAndDrop:
    fromCss: '[data-handle="resize"]'
    toX: 400
    toY: 280