CheckOps
UI Automator
UI Automator is Google's Android UI testing framework for cross-app and system UI automation; version 2.4 introduced a modern Kotlin API with a uiAutomator test scope, onElement predicates and built-in waiting.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
UI Automator is part of Android’s testing toolkit for black-box UI tests that interact with any visible element on the device, including system UI, settings and other apps. That makes it the right tool for flows that leave your app, such as permission dialogs, notifications, share sheets or launching from the home screen, which Espresso cannot reach.
Google’s documentation now covers a modern approach introduced with UI Automator 2.4, which it says makes tests more concise, readable and robust, and recommends for new development while the API is still evolving (the docs reference androidx.test.uiautomator:uiautomator:2.4.0-alpha05). Key features include a dedicated uiAutomator { ... } test scope, onElement, onElements and onElementOrNull methods that find elements with clear predicates on properties such as text, resource ID, focus or content description, built-in waiting with timeouts, and watchers such as watchFor(PermissionDialog) { clickAllow() } to handle system dialogs. The classic UiDevice and By selector APIs remain available, and Kaspresso wraps UI Automator in its Kautomator DSL.
Features
- Cross-app automation: System UI, settings and other apps.
- Modern Kotlin API:
uiAutomator { onElement { ... }.click() }. - Built-in waiting: Timeouts on element lookups.
- Dialog watchers: Handle permission prompts automatically.
Pros
- Free: Part of AndroidX Test.
- Official: Maintained by Google.
Cons
- Slower than Espresso: Black-box, cross-process interactions.
- Evolving API: The 2.4 API is still marked under development.
Usage and Links (Example)
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.4.0-alpha05")
@Test
fun grantsLocationAndShowsStores() = uiAutomator {
startApp("com.example.shop")
onElement { textAsString() == "Find stores" }.click()
watchFor(PermissionDialog) { clickAllow() }
onElement { viewIdResourceName == "store_list" }
}
Resources:
Pricing
Free and open source as part of AndroidX Test (Apache-2.0).
Recommended for?
- Android teams testing flows across apps or system UI.
- Teams handling permission dialogs and notifications in UI tests.
Conclusion
UI Automator is essential for Android tests that go beyond a single app, and its new Kotlin API makes those tests far more readable.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with UI Automator side by side.
EEspressoEspresso is an Android testing framework for writing concise, beautiful, and reliable UI tests that synchronize automatically with the application's UI.Compare with UI Automator
KKaspressoKaspresso is Kaspersky's Apache-2.0 Android UI testing framework built on Espresso and UI Automator, adding flaky-test protection, a Kotlin DSL, Compose support, ADB access, detailed reports, Allure and Robolectric support.Compare with UI Automator
AAppiumCross-platform automation framework for all kinds of apps, built on top of the W3C WebDriver protocol.Compare with UI Automator
MMaestroMaestro is a YAML UI test runner for Android, iOS, and web. The CLI is free and open source; Maestro Cloud is paid.Compare with UI Automator
JJetpack Compose UI testingJetpack Compose's testing APIs (ui-test-junit4) let Android developers find, assert on and interact with composables through semantics, using createComposeRule on devices or with Robolectric on the JVM.Compare with UI Automator
RRobolectricRobolectric is an MIT-licensed Android unit testing framework that runs tests in a simulated Android environment inside the JVM, routinely 10x faster than cold-started emulators, supporting 14 Android versions from API 24 to 37.Compare with UI Automator