uiautomator-permissions-popups

Installation
SKILL.md

UI Automator — Permissions & Popup Handling

Source: https://developer.android.com/training/testing/other-components/ui-automator, https://developer.android.com/training/testing/other-components/ui-automator-legacy, https://developer.android.com/reference/androidx/test/uiautomator/UiDevice

Purpose

UI Automator tests run outside the app process and frequently encounter system-level dialogs — runtime permission prompts, ANR ("App isn't responding") popups, crash dialogs, and other SystemUI interruptions. This skill covers both the modern watchFor/ScopedWatcher<T> API (2.4.0+) and the legacy registerWatcher/UiWatcher mechanism (2.2.0+) for automatically dismissing or interacting with these unexpected dialogs.

When to Use

  • Dismissing Android runtime permission dialogs (CAMERA, LOCATION, STORAGE, etc.) during test flows
  • Handling ANR/crash dialogs that block UI interactions
  • Testing multi-phase permission flows (deny → clear data → grant)
  • Handling SystemUI overlays (system update prompts, battery-saver notifications)
  • Not for expected in-app dialogs — use regular onElement assertions for those

Basic Usage

Modern API (recommended, 2.4.0+)

Installs
1
First Seen
Jun 19, 2026