Skip to content

[BUG] WDA driver: a flow that taps one permission prompt's button leaves every other prompt unanswered (since 1.1.30) #264

Closed

Description

Version: 1.1.30, since da99dd3 (the fix for #248, "flows can see and tap system permission prompts"). Builds before it answer both prompts below.

Driver: WDA, on real iPhones (iOS 18 and 26 seen) and on a simulator with --driver wda (iOS 27). The DeviceLab driver answers the same flow's prompts.

What happens

Since da99dd3, a flow that taps a prompt's button itself (tapOn: "Ask App Not to Track", tapOn: "Don't Allow") gets no automatic answer for the whole flow: PrepareForFlow finds such a tap (stepsAnswerAlerts), flowAlertAction returns "", and the session starts without WDA's alert monitor. The log says [wda] the flow answers permission prompts itself, leaving them for its steps.

That is right for the prompt the flow taps (#248's case). But a flow often taps one prompt defensively and leaves the others to the automatic answer, as it could before 1.1.30. Every other prompt now stays up over the app, and every later step fails behind it:

  • the app asks for tracking, and later for notifications;
  • the flow taps Ask App Not to Track (optional, in a helper flow it runs after every launch);
  • the notification prompt appears and nothing answers it. While it is up, WDA's active application is SpringBoard, so the next lookups of the app's elements find nothing (Element '#…' not visible within 10s), and a scroll on the screen under it makes "no progress".

The same flow passes with --driver devicelab on the same simulator: that driver has no such rule, although core.IOSAlertAction's comment says the two drivers "answer the same flows the same way".

To reproduce

An app that asks for tracking at launch and for notifications when a button is tapped, and:

appId: APP_ID
---
- launchApp:
    clearState: true
- tapOn:
    text: "Ask App Not to Track"
    optional: true
- tapOn:
    id: enable_notifications     # the app's own button; iOS then shows the notification prompt
- assertVisible:
    id: next_screen_element      # behind the prompt: fails on 1.1.30, passed before da99dd3

Remove the Ask App Not to Track tap and the flow passes again: WDA's monitor answers both prompts.

Expected

A prompt the flow answers itself is left to the flow, as da99dd3 intends; any other prompt is answered as before, according to launchApp's permissions, on both iOS drivers.

Proposed fix

WDA's monitor is one switch for the session, so it cannot leave one prompt alone and answer another. The runner can: a lookup that finds nothing in the app already reads an open alert (findOnSystemAlert). When the flow has turned the monitor off and the open alert has none of the buttons the flow's taps name (and the flow has no acceptAlert / dismissAlert, which may be meant for any prompt), answer it as the monitor would have (Allow…, or Don't Allow… / Ask App Not… for permissions: {all: deny}), and look again. A PR follows.

Activity

  1. omnarayan commented on Nov 12, 2026

    @omnarayan
    Contributor

    Fixed in 1.1.31, out now, from #265. Thanks @luka-vladika-happening-xyz.

    A flow that taps one prompt's button itself no longer turns off WDA's answer for the whole session. A lookup that finds nothing answers such a prompt the way WDA would (Allow…, or Don't Allow… with permissions: {all: deny}) and looks again. The prompts the flow taps are still left to it.

    curl -fsSL https://open.devicelab.dev/install/maestro-runner | bash

    Release notes: https://github.com/devicelab-dev/maestro-runner/releases/tag/v1.1.31

    The second commit on #265 (answering a prompt before a tap, so the tap doesn't land on the prompt) is not in 1.1.31. We'll review and test it for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions