Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyWinAuto still useful?

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.

like image 914
stimms Avatar asked Mar 18 '09 02:03

stimms


People also ask

What is Pywinauto used for?

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.

What is UIA in Pywinauto?

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.


2 Answers

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:

  • similar tools overview in the pywinauto docs
  • UI Automation tools rating by GitHub stars and SO stats.
like image 131
Vasily Ryabov Avatar answered Oct 11 '22 03:10

Vasily Ryabov


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.

like image 34
William Knight Avatar answered Oct 11 '22 05:10

William Knight