pywinauto is a set of python modules to automate the Microsoft Windows GUI. At it’s simplest it allows you to send mouse and keyboard actions to windows dialogs and controls, but it has support for more complex actions like getting text data.
Recommended usage: 64-bit Python is for 64-bit applications; 32-bit Python is for 32-bit ones.
- run
pip install -U pywinauto
(dependencies will be installed automatically)
It is simple and the resulting scripts are very readable. How simple?
from pywinauto.application import Application
app = Application().start("notepad.exe")
app.UntitledNotepad.MenuSelect("Help->About Notepad")
app.AboutNotepad.OK.Click()
app.UntitledNotepad.Edit.TypeKeys("pywinauto Works!", with_spaces = True)
- Introduction
- Table of contents
- Change Log / History
- HowTo's
- Code examples (gists) on gist.github.com
- Mailing list
- pyWin32 only
Optional packages:
- Install Pillow (by
pip install -U Pillow
) to be able to callCaptureAsImage()
method for making control's snapshot.
Run all the tests: python ./pywinauto/unittests/testall.py
Pull requests are very welcome. Read Contribution Guide for more details about unit tests, coding style etc.
Pywinauto for native Windows GUI was initially written by Mark Mc Mahon. Mark brought many great ideas into the life using power of Python. Further contributors are inspired of the nice API so that the development continues.
Pywinauto 0.5.4 and before is distributed under the LGPL v2.1 or later. Starting from 0.6.0 pywinauto will be distributed under the BSD 3-clause license.
- (c) The Open Source Community, 2015-2016 (0.6.0+ development)
- (c) Intel Corporation, 2015 (led 0.5.x maintenance)
- (c) Michael Herrmann, 2012-2013 (0.4.2)
- (c) Mark Mc Mahon, 2006-2010 (0.4.0 and before)