Skip to content

[BUG] ExposedDropdownMenu (AutoCompleteTextView) popup items not in hierarchy under maestro-runner, but works under stock maestro #93

@ConorGarry

Description

@ConorGarry

Description

Dropdown items from a Material ExposedDropdownMenu are not visible to Maestro when run via maestro-runner, but are visible when run via the stock maestro CLI on the same device/app. The field itself is found and tappable in both; only the popup items differ.

Steps to Reproduce

  1. Minimal app: a single TextInputLayout styled …ExposedDropdownMenu wrapping an AutoCompleteTextView backed by a 4-item ArrayAdapter (full repro below).
  2. Run via stock maestro: maestro test flow.yaml.
  3. Run via maestro-runner: maestro-runner test flow.yaml.

Expected Behavior

Both runners tap the field, the popup opens, and Option 1 is found and tapped.

Actual Behavior

  • stock maestro: ✅ taps Option 1, dropdown selection fires.
  • maestro-runner: ❌ field opens (visible overscroll/popup on screen) but Option 1 is never found, Element not found.

Environment

  • Mac 0S 26.5.1
  • maestro-runner: 1.1.16

Flow File

  appId: <pkg>
   ---
   - launchApp
   - tapOn:
       id: "actv_dropdown_question"
   - tapOn: "Option 1"

Error Output

 Element not found: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters (cause: context deadline exceeded: no such element: An element could not be located on the page using the given search parameters)

Additional Context

Repro App:

<com.google.android.material.textfield.TextInputLayout
    android:id="@+id/til_dropdown_question"
    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="Dropdown">
    <AutoCompleteTextView
        android:id="@+id/actv_dropdown_question"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="none" />
</com.google.android.material.textfield.TextInputLayout>
// MainActivity.kt
with(bind.actvDropdownQuestion) {
    setAdapter(
        ArrayAdapter(
            context,
            android.R.layout.simple_dropdown_item_1line,
            listOf("Option 1", "Option 2", "Option 3", "Option 4")
        )
    )
    onItemClickListener = AdapterView.OnItemClickListener { _, _, position, _ ->
        println("selected: $position")
    }
}

I guess it's due to this View using PopUpWindow API under the hood?

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