uiautomator
Python Wrapper for Android UiAutomator test tool
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 uiautomatoruv
uv add uiautomatorpoetry
poetry add uiautomatorInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
uiautomator2Automates Android device interactions from…
permissive · top 15,000 on PyPI
uiautomationAutomates Windows UI controls and windows by…
permissive · top 15,000 on PyPI
androidtvremote2A Python library for controlling Android TV…
permissive · top 15,000 on PyPI
adbutilsadbutils is a Python library that communicates…
permissive · top 15,000 on PyPI
adb-shellImplements ADB (Android Debug Bridge) shell and…
permissive · top 15,000 on PyPI
pure-python-adbPure-Python ADB client that communicates with…
permissive · top 15,000 on PyPI
python-fullykioskProvides a Python interface to the Fully Kiosk…
permissive · top 15,000 on PyPI
facebook-wdaPython client library for controlling iOS…
permissive · top 15,000 on PyPI
moblyMobly is a Python test framework designed to…
permissive · top 15,000 on PyPI
mozdeviceManages and controls connected mobile devices…
copyleft · top 15,000 on PyPI