By design, Maestro discourages the usage of conditional statements unless absolutely necessary as they could easily ramp up the complexity of your tests.
Note that multiple conditions are applied as AND conditions.
Conditions
Supported conditions include:
visible: { Element matcher } # True if matching element is visiblenotVisible: { Element matcher } # True if matching element is not presenttrue: { Value } # True if given value is true or not emptyplatform: { Platform } # True if current platform is given platform (Android|iOS|Web)
All of the normal element matchers are supported, e.g.
- runFlow:when:visible:id:'someId'text:'Some Text'below:text:'Some Other Text'childOf:id:'someParentId'text:'Some Parent Text'index:2file:folder/some-flow.yaml
JavaScript
Usage of JavaScript conditions is possible via true condition: