maestro icon indicating copy to clipboard operation
maestro copied to clipboard

add `timeout` option to `when`

Open lgawin opened this issue 3 years ago • 0 comments
trafficstars

I'd like to perform some conditional paths (kind'a if-else) and according to documentation runFlow: when: is the way I can achieve that.

So I have a script:

# flow.yaml

appId: "com.example.myfirstapp"
---
- launchApp
- assertVisible: "data loaded"
- runFlow:
    when:
        visible: "some text"
    file: sub_flow_1.yaml
- runFlow:
    when:
        notVisible: "some text"
    file: sub_flow_2.yaml

It is working as expected, however I'm loosing few seconds (probably 5s) for this branching. As only one of the branches will execute and after assertVisible: "data loaded" check I don't need to waste any more time, I'd love to have timeout option for when which I can set to some low value (or even 0) to save few precious seconds.

lgawin avatar Oct 27 '22 20:10 lgawin