--- id: uiautomation version: "2.0.29" license: Apache 2.0 license_treatment: permissive maintenance: active --- # uiautomation — Python UIAutomation for Windows License: permissive · Maintenance: active · Downloads: 289.4K/mo ## What it is and what it does uiautomation is a Python wrapper around the Microsoft UIAutomation API for Windows, allowing developers to programmatically find, inspect, and interact with UI controls in Windows applications. It works with applications that implement UIAutomation providers—including MFC, Windows Forms, WPF, Modern UI, Qt (partially), Firefox, Chrome, and Electron-based apps—enabling automated testing, control manipulation, and UI traversal. The package provides a control tree model where you search for UI elements by their properties (name, control type, depth) and then interact with them via patterns (value, invoke, etc.). It includes a command-line tool (automation.py) for exploring the control hierarchy and a Python API for scripting. The main constraint is that it requires administrator privileges on Windows 7 and higher, and certain Python versions (3.7.6, 3.8.1) are incompatible due to comtypes issues. Use it for: - Automated testing of Windows desktop applications by simulating user interactions like clicks, text input, and menu navigation - Building test automation frameworks that verify UI behavior across MFC, WPF, and Windows Forms applications - Creating accessibility inspection tools to audit UI control properties and supported interaction patterns - Scripting repetitive UI tasks in legacy Windows applications that lack APIs or command-line interfaces - Automating data entry workflows across multiple Windows applications by chaining control searches and interactions ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Automates Windows UI controls and windows by interacting with the Microsoft UIAutomation API, enabling programmatic inspection and manipulation of application interfaces. Yes, if you need to automate Windows UI testing or control interaction. The package is actively maintained, has low install friction, and covers a broad range of Windows application types. Install only on Windows 7 or later, run as administrator, and avoid Python 3.7.6 and 3.8.1. No known security vulnerabilities. ## Install pip install uiautomation uv add uiautomation poetry add uiautomation ## Installing uiautomation Before you install: Low install friction with a single runtime dependency (comtypes). Actively maintained with recent commits and a substantial user base. Note: avoid Python 3.7.6 and 3.8.1 due to comtypes incompatibility; use an earlier or later version instead. License in practice: Apache 2.0 permissive license allows free copying, distribution, and use with minimal restrictions, making it suitable for both open-source and proprietary projects. Quickstart: pip install uiautomation import uiautomation as auto # Find and interact with a window window = auto.WindowControl(searchDepth=1, ClassName='Notepad') edit = window.EditControl() edit.SendKeys('Hello World') Must run Python as administrator on Windows 7 or higher; otherwise control enumeration and information retrieval may fail. Windows 7 or later required. Verify before relying: - Whether partial Qt support covers the specific Qt versions or frameworks in use - Whether Electron apps require the --force-renderer-accessibility flag to be set externally or if the package handles it - Performance characteristics when traversing large control trees with many nested controls ## Package facts - License: Apache 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 289.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags windows ui automation, automate windows applications, windows control inspection, ui element interaction windows, windows accessibility automation, desktop automation windows, windows app testing automation, windows-automation, ui-testing, accessibility [View on SkillFed](https://skillfed.io/packages/uiautomation) · [View on PyPI](https://pypi.org/project/uiautomation/)