Skip to content

[BUG] String interpolation in repeat: while: visible: id: doesn't work as expected #97

@pk1m

Description

@pk1m

Description

Hello again, thanks in advance for looking at this issue.

${output.*} string interpolation doesn't seem to work inside the while condition's visible/notVisible id: selector.

Steps to Reproduce

- evalScript: ${output.nextTabIndex = 1}
- repeat:
    times: 4
    while:
      visible:
        id: secondary-nav-pressable-${output.nextTabIndex}
    commands:
      - tapOn:
          id: secondary-nav-pressable-${output.nextTabIndex}
      - extendedWaitUntil:
          visible:
            id: home-tab-${output.nextTabIndex}
      - repeat:
          times: 3
          while:
            notVisible:
              id: 'view-all-button'
          commands:
            - scroll:
                direction: DOWN
                speed: 80
      - evalScript: ${output.nextTabIndex = output.nextTabIndex + 1}

the key part is

    while:
      visible:
        id: secondary-nav-pressable-${output.nextTabIndex}

Expected Behavior

It should correctly recognize that secondary-nav-pressable-1 is visible.

Actual Behavior

The repeat block fails to run at all. If I hard code the index the repeat block runs as expected. I verified that this works in maestro / maestro studio with no issues.

Environment

maestro-runner 1.1.15-rc.1
Commit: b214fee
Built: 2026-05-13T05:41:51Z
Go: go1.26.0
OS/Arch: darwin/arm64

  • Executor: default
  • Device/Simulator: Samsung a24

Error Output

No error, the repeat block doesn't run because the id in the while block is not visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions