Description
When using Maestro env var substitution with default value, according to the docs, maestro-runner fails to parse the default value.
Steps to Reproduce
- Use a flow similar to the subflow in the link
- Run the flow
Expected Behavior
Env var should fall back to default value if it isn't set on runtime.
Actual Behavior
maestro-runner inserts as the -inputText value the whole conditional, e.g. ${USER_ID || "test_user_1"}
Environment
- OS: macOS 26.3
- Go version: go version go1.26.2 darwin/arm64
- maestro-runner version: 1.1.1
- Executor: UIAutomator2
- Device/Simulator: Pixel 7 pro emulator
Flow File
# subflows/login.yaml
appId: com.example.app
env:
# Use the passed value, or default to a test account
USER_ID: ${USER_ID || "test_user_1"}
---
- tapOn: "User ID"
- inputText: ${USER_ID}
Error Output
tapOn: text="blabla" (7.0s)
╰─ context deadline exceeded: no such element: An element could not be located on the page using the given search parameters
Additional Context
the error message is related to the step after the -insertText command which fails to properly insert text
Description
When using Maestro env var substitution with default value, according to the docs, maestro-runner fails to parse the default value.
Steps to Reproduce
Expected Behavior
Env var should fall back to default value if it isn't set on runtime.
Actual Behavior
maestro-runner inserts as the -inputText value the whole conditional, e.g.
${USER_ID || "test_user_1"}Environment
Flow File
Error Output
Additional Context
the error message is related to the step after the
-insertTextcommand which fails to properly insert text