I've been playing with PyWinAuto today and having fun automating all sorts GUI tests. I was wondering if it is still state of the art or if there might be something else (also free) which does windows rich client automation better.
pywinauto is a set of python modules to automate the Microsoft Windows GUI. At its 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.
Bases: pywinauto.base_wrapper.BaseWrapper. Default wrapper for User Interface Automation (UIA) controls. All other UIA wrappers are derived from this. This class wraps a lot of functionality of underlying UIA features for working with windows. Most of the methods apply to every single element type.
New pywinauto 0.6.0 has introduced MS UI Automation support under the hood. So that WinForms, WPF, Qt, Store apps etc. could be automated almost the same way as an old native Win32 application.
Moreover it's possible to use mouse
and keyboard
modules out of a window/control context. These modules work on Linux as well!
New module win32_hooks
is inspired by pyHook and similar libraries, but it doesn't require compilation.
Yeah, this post is a kind of ad. But I just wanna say pywinauto is still useful and I believe it will be even more useful in the future. The developers community currently consists of 2 mature developers and 3 talented students and we have long term plans on Linux and Mac OS X.
P.S. There are some more open source tools:
I used to do test automation on our projects with AutoIt but switched over to pywinauto 3 months ago and have been very happy with that decision. There are some rough edges, but I've been able to fill them in with my own supplementary test functions. In addition I find that coding tests and support code in Python is much easier and more manageable compared to AutoIt. With Python I have way more powerful options for logging, debugging, documentation, process management and test configuration. For me it was absolutely the right way to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With