Skip to content

Windows GUI Automation with Python (based on text properties)

License

Notifications You must be signed in to change notification settings

Fusion86/pywinauto

Repository files navigation

Join the chat at https://gitter.im/pywinauto/pywinauto Documentation Status Build status codecov.io Code Health Codacy Badge

pywinauto

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.

Setup

  • run pip install -U pywinauto (dependencies will be installed automatically)

Example

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)

Documentation

Dependencies (if install manually):

Optional packages:

  • Install Pillow (by pip install -U Pillow) to be able to call CaptureAsImage() method for making control's snapshot.

Packages required for running unit tests

Run all the tests: python ./pywinauto/unittests/testall.py

Contribution

Pull requests are very welcome. Read Contribution Guide for more details about unit tests, coding style etc.

Copyrights

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)

About

Windows GUI Automation with Python (based on text properties)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Other 0.6%