maestro icon indicating copy to clipboard operation
maestro copied to clipboard

onFlowFailure hook when a step failed

Open Revono opened this issue 9 months ago • 12 comments

Use case

Hi all!

I absolutely love this framework!

The only thing I’m missing is a simple onFailure parameter that allows executing a .js (runScript) script when something inside my Flow fails. I went through the entire documentation, but I couldn’t find anything like this.

Would implementing this be a big task?

Proposal

Something like this would be sooooo big:

---
appId: com.sample.app
---
- try:
    - assertVisible: "Living Room"

- runScript:
    file: update_notion_passed.js
    env:
      pageId: "xyz" 

- onFailure:
    - runScript:
        file: update_notion_failed.js
        env:
          pageId: "xyz" 

Anything else?

No response

Revono avatar Mar 03 '25 16:03 Revono