skillfed

pywinauto

A set of Python modules to automate the Microsoft Windows GUI

pywinauto v0.6.9 3.1M downloads/30d#2,770 on PyPI6,144
Permissive license BSD 3-clause Active released

What it is and what it does

Pywinauto is a Python library for automating the Microsoft Windows graphical user interface. It lets you programmatically control windows, dialogs, and UI controls by sending mouse clicks and keyboard input, and extracting text data from controls. The library supports two backends: Win32 API (the default, lower-level) and MS UI Automation (higher-level, for modern Windows applications). It's commonly used for GUI testing, repetitive task automation, and integration testing of Windows desktop applications.

The package depends on pywin32 and comtypes for Windows-specific functionality, python-xlib for Linux support, and six for Python 2/3 compatibility. Installation is straightforward via pip with low friction. The codebase is stable and actively maintained, with a long history dating back to 2006 and a permissive BSD 3-clause license.

Use it for:

  • Automate repetitive Windows desktop tasks like form filling, menu navigation, and dialog interaction in legacy or custom applications.
  • Write integration tests for Windows GUI applications that verify UI behavior, control state, and user workflows.
  • Build test automation scripts for quality assurance of Windows desktop software without modifying the application code.
  • Extract data from Windows applications by automating navigation and reading control text and properties.
  • Create end-to-end test suites for Windows-based business applications as part of continuous integration pipelines.

Worth the install?

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

Automate Microsoft Windows GUI interactions by sending mouse and keyboard actions to windows, dialogs, and controls, with support for both Win32 API and MS UI Automation backends.

Yes, if you need to automate Windows GUI interactions or test Windows desktop applications. The library is mature, actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is low and dependencies are standard. The main constraint is that it is Windows-specific for core functionality, so it is only suitable for Windows automation tasks.

Install

pywinauto on PyPI

pip

pip install pywinauto

uv

uv add pywinauto

poetry

poetry add pywinauto

Installing pywinauto

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained with recent commits and a large user base (6144 stars); last release was recent, though the repository shows 585 days since the most recent release, suggesting a stable but not rapidly-iterated codebase.

License in practice

Distributed under BSD 3-clause (permissive), allowing commercial and private use with minimal restrictions. No licensing friction for most use cases.

Quickstart

pip install pywinauto

from pywinauto.application import Application
app = Application().start("notepad.exe")
app.UntitledNotepad.Edit.type_keys("Hello World", with_spaces=True)

Windows-only for most functionality; Win32 API backend requires Windows. User input emulation modules (mouse, keyboard) work on Windows and Linux, but core GUI automation is Windows-specific.

Verify before relying

  • Current Python version support beyond the classifiers listed (2.7, 3.5, 3.6, 3.7)
  • Whether the cross-platform roadmap mentioned (Linux in 2018, macOS in 2019) has been realized
  • Status of the record-replay generator feature mentioned as under development

Package facts

License BSD 3-clause (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 4 — six, python-xlib, comtypes, pywin32
Maintenance actively maintained — 585 days since the last release
Last repo commit
First released
Downloads 3,060,852/month — #2,770 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pywinauto-0.6.9-py2.py3-none-any.whl

Keywords: windows, gui, automation, GuiAuto, testing, test, desktop, mouse, keyboard

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: Microsoft :: WindowsProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Software Development :: User Interfaces

Tags

windows gui automationautomate windows dialogswindows ui testingmouse keyboard automation windowswin32 gui controlwindows application testingdesktop automation python
windows-automationgui-testingtest-automation

More Python Modules packages