July 26, 2022 · 2 min read

Will Will

There are much clerical works in desktop client side which are repeatitive tasks, like filling forms, sending messages to multiple groups, manipulating ERP system etc. These operations cost much of employees’ time, and automating these client side software to reduce human time in these operations is a good alternative.

There are some options to do the software automation, and I will introduce Pywinauto and Clicknium as below.

About Pywinauto

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.

Supported technologies under the hood : Win32 API (backend="win32"; used by default ), MS UI Automation (backend="uia"). User input emulation modules mouse and keyboard work on both Windows and Linux.

Setup

About Clicknium

Clicknium is a new generation automation framework supporting GUI automation for all types of applications. Automation development efficiency is highly improved, including developer tooling support and cloud native data management for collaboration.

Setup

Difference in capturing locators

A Sample for Windows GUI automation

The sample is as below :

Clicknium

Pywinauto

from pywinauto.application import Application
app = Application(backend='uia').start("notepad.exe")
app.UntitledNotepad.Edit.type_keys("hello automation", with_spaces = True)
main = app.window(title='*Untitled - Notepad', control_type='Window')
closeBtn=main.child_window(title="Close", control_type='Button')
closeBtn.click_input()
closeDlg=main.child_window(title="Don't Save", control_type='Button')
closeDlg.click_input()

Conclusion

From the sample above, with Clicknium Recorder and Locator, the automation process can be implemented easily. By using UISpy.exe, the developer needs to understand the properties that can be used to locate element, and the format of locator string in code which requires additional learning cost.

What is more, Clicknium also support Web automation with same programming interface. So in any case that you need to do web automation, you can save cost of finding another python module.

Tags: