Skip to main content

Documentation Index

Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

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.
useSelectorbooleanNoSkip AI resolution and require the cached selector to match exactly.
forcebooleanNoForce the action even when the element is not actionable.
DANGEROUS_FORCE_DYNAMICbooleanNoBypass the step cache and resolve the target dynamically every run.
iframestringNoDescription of the iframe to scope the action to.
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.
commentstringNoFree-form annotation kept with the step.

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