Description
scrollUntilVisible fails when used inside a repeat block if the tapped element changes its text from "Favourite" to "Unfavourite". The first iteration succeeds, but subsequent iterations time out and tapOn fails with no such element.
The same commands work correctly when written sequentially outside of a repeat block.
Steps to Reproduce
- Run command
maestro test my-flow.yaml
- With flow file (see below)
- Observe failure inside
repeat after the first iteration
Expected Behaviour
Each iteration should:
- Execute
scrollUntilVisible for "Favourite"
- Tap
"Favourite"
- Repeat successfully for the configured number of times
Actual Behaviour
The first iteration succeeds. On the second iteration:
scrollUntilVisible runs but eventually times out
tapOn fails with no such element
- The
repeat block fails with context deadline exceeded
Environment
Flow File
appId: abc
---
- repeat:
times: 3
commands:
- scrollUntilVisible:
element: "Favourite"
- tapOn: "Favourite"
Error Output
✗ repeat (41.6s)
╰─ Element not found: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters
✓ scrollUntilVisible (3.4s)
✓ tapOn (243ms)
⚠ scrollUntilVisible (20.1s)
✗ tapOn (17.3s)
╰─ context deadline exceeded: no such element: An element could not be located on the page using the given search parameters
Description
scrollUntilVisiblefails when used inside arepeatblock if the tapped element changes its text from"Favourite"to"Unfavourite". The first iteration succeeds, but subsequent iterations time out andtapOnfails withno such element.The same commands work correctly when written sequentially outside of a
repeatblock.Steps to Reproduce
maestro test my-flow.yamlrepeatafter the first iterationExpected Behaviour
Each iteration should:
scrollUntilVisiblefor"Favourite""Favourite"Actual Behaviour
The first iteration succeeds. On the second iteration:
scrollUntilVisibleruns but eventually times outtapOnfails withno such elementrepeatblock fails withcontext deadline exceededEnvironment
OS: macOS (darwin/arm64)
Go version: go1.26.0
maestro-runner version: 1.0.8-rc2
Executor: UIAutomator2
Device/Simulator: Pixel 6 API 34 Emulator
Flow File
Error Output