Select Page

Category Selected: Desktop App Automation Testing

3 results Found

People also read

Automation Testing

A Conclusive Allure Report Tutorial with Sample Report

Automation Testing

gspread Python Tutorial for Google Sheets Automation

Talk to our Experts

Amazing clients who
trust us

Desktop App Automation Testing using Python

Desktop App Automation Testing using Python

In this blog article, you will learn Desktop app automation testing using Python. Automating a desktop app is not an easy task using open-source tools. In the past, we wrote many blog articles on how to automate desktop applications test cases using White Framework.

However, today we would like to show you how to automate a desktop app using Python.

Required Packages

To automate desktop app, we need the following packages (pyWin32, comtypes, & six). Use the below Pip command to install all the three packages.

pip install pywinauto  

Launching An Application

from pywinauto.application import Application
app = Application().start("notepad.exe")

Inspecting Elements

You can use anyone of the below listed inspecting tools to write locators.

  • AccEvent.exe
  • AccExplorer32.exe
  • Inspect.exe
  • swapy-ob-0.4.3.exe
  • UISpy.exe
  • ViewWizard.exe
  • WSEdit.EXE

Locating windows by title

app.window(title="Untitled - Notepad").menu_select("Help->About Notepad")

Locating with regular expression

app.window(title_re='.* - Notepad$')

Finding a window with multiple properties

window = findwindow(title = "Untitled - Notepad", class = "Notepad")

Print Identifiers

Use the below command to print all the identifiers on a window.

app.window(title="Untitled - Notepad").print_control_identifiers()  

Other Actions


We explored this library with excitement. Desktop app automation testing using Python library is more user-friendly and the execution is also much faster than other implementations.

How to automate desktop application test cases

How to automate desktop application test cases

Automating desktop app test cases using open source tools is an herculean task. It requires complete understanding of your application’s technology and in-depth knowledge of how your OS interacts with desktop applications. For example: If you are automating a Windows desktop application, you should be aware of how Windows Event-driven programming interacts with your application. In this blog article, we will see most of the technical information based on Windows application.

Technologies for windows desktop app development

Knowing the technologies for Windows desktop app development is a key information to decide a right automation tool. If you take any Windows based desktop application, it must have been developed using the following package/framework Windows API, MFC (Microsoft Foundation Classes), and .NET. When you choose a test automation tool, just check whether these technologies are supported.

How to automate desktop application test cases

How Windows Works

Consider your software under test is developed using Windows API. Each application window is assigned with Window Handle (hwnd). Once the user depresses the left mouse button on the application window, then Windows OS will construct a message and send it to the designated window using hwnd.

Automating Windows Desktop Application

From our experience, we recommend the following libraries (White Framework, FlaUI, .NET UI Automation, and Win32 Library for .net) to automate desktop applications. Choosing a tool is a cakewalk. However, selecting an unique identifier to locate a Windows object is tricky. Automating Desktop application test cases using coordinates is not a good idea. You always need to write robust locators to achieve consistency in automated script execution. Use Object Spy, understand the underlying technology, and perform trail & error method to construct valid object locators.

Automating Windows Desktop Application

In Conclusion:

Don’t automate Desktop Application Test suite without doing a POC. Make sure you engage a test automation architect who has vast experience in automating Desktop, Web, and Mobile applications.

All about Desktop Application Testing

All about Desktop Application Testing

Desktop applications require a human to run them and work separately as full-function programs and independently of all other applications. Adequate and proper hardware and a set of functions are required for accurate desktop application testing. This testing is complex and intricate since most are developed for a particular environment, and hence interaction with other factors is nil. In addition, a number of computer systems with varying configurations are required for this type of testing, but the tester has the ability to completely control the application under test.

Understanding Desktop Applications

Specific environments act as the model or starting point of a test plan. It is possible to test an application under classifications such as load, functionality, GUI, and more, and since desktop applications are normally in use by a single user at a given point, it must be installed as an exe file.

There is of course a significant rise in mobile and handheld device technology, but desktops are still used, and hence businesses must ensure that the applications for such systems are ready to function when installed. It is necessary that desktop applications are not ignored and made part of QA programs and any top quality QA Outsourcing company will understand the importance of such applications and will ensure that your business has the best.

Just as with any applications and systems, desktop applications need deft management since if poorly running and defective, they can negatively impact business, increase costs, and lead to a severe dent in the reputation of a company.

Running desktop applications is about testing applications on personal computers, desktop computers, and other such devices, and testing is run to check functionality, security, usability, stability, and more. If companies have the resources both money and human, to invest in this type of testing it would make sense to have an in-house team. However, since such testing has stringent deadlines and requires a high level of quality control, most businesses may find themselves incompetent to deal with it. It would make more business sense to outsource this function to a top quality QA testing company, capable of delivering more for every resource invested. Such a company would not only help to bring down costs and overheads of managing such tests, but would also ensure that the software remains efficient and speedy across all the stages.

Common Errors in Desktop Applications

The kind of errors in desktop application is different to other applications, which is why they require professionals to manage them.

  • 1. Inaccurate and unauthorized features auto installed by the application, without input from the user
  • 2. Wrong shortcut icon
  • 3. Issues related to dependence on platform
  • 4. Background running of a process even post uninstallation of application
  • 5. Incorrect warning / error messages
  • 6. Unauthorized access to users to even restricted applications

A Checklist for Desktop Application Testing is Necessary

Anyone excelling in the realm of testing would know that a checklist is quintessential when writing test cases, and in the case of desktop applications too such a checklist would help to create a high number of test cases. The testing checklist should include the following tests:

  • 1. Testing GUI or Graphical User Interface
  • 2. Functional Testing
  • 3. Performance testing under normal and load conditions
  • 4. Compatibility Testing

There are several tools that are part of industry practice to assist with desktop application testing. A highly seasoned software testing company would have the latest tools, technology, and methodologies for this purpose. The tools include a variety of regression testing and stress testing tools. Such a company would also understand that since there are some key differences between web applications and desktop applications, their handling and testing would also be different and must be managed as so.

In Conclusion:

The ownership, responsibility and accountability of a desktop application tester are very different to that of a web or client server applications tester. Understanding these differences proves critical to ensure that product quality is of the highest order and a highly expert team of desktop application testers would always remain on point. Connect with us to access the best in class team of experts.