Skip to main content
Lower-level companion to dragAndDrop. Specify an origin (default: the current pointer position) and a relative delta in pixels.

Parameters

ParameterTypeRequiredDescription
deltastring | { x, y }YesRelative pixel delta from the origin. Either x, y string or { x, y } object.
fromstringNoDescription of the origin element.
cssstringNoCSS selector for the target. Use instead of the description key.
coordsstring | { x, y }NoAbsolute viewport coordinates. Either an x, y string (e.g. 120, 40) or a { x, y } object.
xnumber | stringNoX coordinate. Must be provided together with y.
ynumber | stringNoY coordinate. Must be provided together with x.
forcebooleanNoForce the action even when the element is not actionable.
iframestringNoURL or URL pattern of the iframe that contains the target element.
stepsnumberNoNumber of mouse-move steps to interpolate.
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.

Shorthand

delta as x, y from the current pointer position.
- mouseDrag: 200, 0

Examples

- mouseDrag:
    delta:
      x: 11
      y: 22
- mouseDrag:
    from: the slider thumb
    delta: 200, 0
    steps: 20