skillfed

uiautomator

Python Wrapper for Android UiAutomator test tool

uiautomator v1.0.2 84.4K downloads/30d#14,001 on PyPI2,095
Permissive license MIT Abandoned released

What it is and what it does

uiautomator is a Python wrapper around Android's native uiautomator testing framework, allowing you to write test automation and UI interaction scripts in Python that run against Android devices connected via ADB. It provides a high-level API for clicking UI elements, swiping, dragging, checking screen state, pressing keys, and registering watchers to handle dynamic UI conditions—all without needing to install anything on the Android device itself.

The package works by communicating with the Android device through ADB commands. You import a device object, then interact with it using selectors to find UI elements by text, resource ID, or other properties, and perform actions like clicks, long-clicks, and gestures. It supports retrieving device info, taking screenshots, dumping the view hierarchy, and managing screen orientation. However, the package has been abandoned since 2020 and receives no maintenance, so compatibility with modern Android versions and Python releases is uncertain.

Use it for:

  • Automated testing of Android app UI flows and user interactions in CI/CD pipelines
  • Regression testing by scripting repetitive UI actions across multiple Android devices
  • Device automation tasks like taking screenshots, checking screen state, or pressing keys programmatically
  • Functional testing of Android applications without modifying the app's source code

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python wrapper for Android's uiautomator testing framework that automates UI interactions on Android devices via ADB without requiring installation on the device itself.

No. While the package is permissively licensed and has no known vulnerabilities, it is abandoned (last update 2020) and carries high install friction due to external Android SDK and ADB dependencies. For active Android test automation, consider maintained alternatives. If you must use it, verify compatibility with your target Android versions and Python release first.

Install

uiautomator on PyPI

pip

pip install uiautomator

uv

uv add uiautomator

poetry

poetry add uiautomator

Installing uiautomator

Before you install

High install friction: requires Android SDK, ANDROID_HOME environment variable, ADB setup, and a connected Android device. Package is abandoned with no updates since 2020.

License in practice

MIT license permits commercial and private use with minimal restrictions, making it safe from a licensing standpoint for most projects.

Quickstart

pip install uiautomator

from uiautomator import device as d

d.screen.on()
d(text="Clock").click()

Requires Android SDK installed with ANDROID_HOME environment variable set, ADB enabled on device, USB connection to Android device, and Android 4.1+ (API Level 16–30).

Verify before relying

  • Whether the package works reliably with Android API levels beyond 30 or modern Python 3.x releases
  • Current compatibility with contemporary ADB implementations and Android SDK versions
  • Whether the codebase has known issues or breaking changes affecting typical use cases

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 2,097 days since the last release
Last repo commit
First released
Downloads 84,388/month — #14,001 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: uiautomator-1.0.2-py2.7.egg; uiautomator-1.0.2.tar.gz

Keywords: testing, android, uiautomator, uiautomatorpy

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: POSIX :: LinuxProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Testing

Tags

android ui automation testingandroid uiautomator python wrapperadb device automationandroid app testing frameworkui element interaction androidandroid device control python
android-testingui-automationabandoned

More Python Modules packages