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.

A conditional is a single if key holding exactly one assertion condition plus a then list. The condition is an assert, a screen check, an element check, or a javascript expression. Mobile conditionals do not support else. Use a separate step instead.

Parameters

ParameterTypeRequiredDescription
conditioncommandYesExactly one assertion command: assert, checkScreenContains, checkScreenDoesNotContain, a checkElement<...> alias, or javascript.
thenstep[]YesSteps to run when the condition passes.
commentstringNoFree-form annotation kept with the step.

Examples

- if:
    checkElementVisible: the cookie banner # condition: run `then` only when this passes
    then:
      - tap: Accept all
- if:
    assert: A success banner is visible
    then:
      - tap: Continue