Table of contents
1.
Introduction
2.
Troubleshooting Windows Automated Testing: An Overview
3.
Exception 1: sendKeys() Method Incompatible With German Keyboard
4.
Exception 2: Timeout Occurs When a Windows Application is Launched.
4.1.
Solution
5.
Exceptions 3: Windows Application does not Start
5.1.
Solution
6.
Issues And Limitations Of Katalon
7.
Frequently Asked Questions
7.1.
What is Katalon Studio? 
7.2.
Which Operating systems support the Katalon Automation testing tool?
7.3.
Is using Katalon Studio hard? What skills are pre-required?
7.4.
What is the use of the setText keyword?
7.5.
What framework is used in Katalon Studio?
8.
Conclusion
Last Updated: Mar 27, 2024
Medium

Troubleshoot Windows Automated Testing In Katalon Studio

Author Lokesh Sharma
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

“Debugging is like being the detective in a crime movie, where you are also the murderer!”

Welcome Ninja! The fact that you are here means that you got some trouble while testing your windows applications in Katalon. But don’t you worry! This blog will guide you through all sorts of exceptions you may face while testing. Just a single read of this blog, and you can stop worrying about the debugging part and focus on testing.

Troubleshoot windows automated testing in Katalon Studio

We will focus on the errors and exceptions during automated windows testing in Katalon. We will also look at various ways to debug these errors.

Gaining the knowledge of resolving these exceptions will boost your efficiency in using Katalon for windows application automation. 

Troubleshooting Windows Automated Testing: An Overview

As the name suggests, Windows automation testing means validating windows applications against multiple test cases. We check if the software is functioning properly. Automation avoids human interference and reduces errors while testing. WinAppDriver is used to provide these automation functionalities. Due to various reasons, such as an outdated driver, or increased system load, the testing process does not go as planned. The system throws some statements hinting at what is wrong, called exceptions.

This blog will discuss such commonly occurring exceptions and explore ways to resolve them. In the process of solving these errors, you will also get to learn why these exceptions occur in the first place. 

  • The sendKeys keyword did not send the correct text with the German keyboard as the default setting.
     
  • Timeout when launching the Windows application.
     
  • Unable to start the Windows application.
     

Let us look at these exceptions in detail and learn about the various handling techniques.

Exception 1: sendKeys() Method Incompatible With German Keyboard

We use the sendKeys keyword to automatically fill editable fields such as names and passwords in forms. This method helps to save a lot of time in testing. However, incompatibility may arise when the user has a German keyboard as default. The data sent is not in the correct format.

This issue happens because sendKeys applies the QWERTY style on the keyboard. Statements such as “Zoro said yes!” are sent as “Yoro said zes!”

In this case, we suggest you switch the language or keyboard in windows. Switch the default keyboard to English, and it will work just fine.  Switch to the English keyboard before you use setText, then switch back to German after the action is complete. Use Shift + Left Alt to toggle between languages.

Exception 2: Timeout Occurs When a Windows Application is Launched.

Timeout occurs when an application takes a long time to start than the default waiting time of the testing environment. This timeout happens because of heavy ram usage and low performance. What comes next is obvious. We try to clear space and optimize the performance. You can try one of the following solutions:

Solution

  • Close all unneeded apps and open folders. Open Katalon Studio only.
     
  • Remove unused shortcuts on your desktop and your taskbar.
     
  • Clear cache.
     
  • Instead of directly opening the main app title, try starting the application first. You can then switch or navigate to the target title. This method consumes less time, and internally, it requires less number of operations.

Use Windows.startApplication(…) instead of Windows.startApplicationWithTitle(…).

For example,

Windows.startApplication('C:\\Users\\CodingNinjas\\WebDevCourse\\TimerApp\\Timer.exe') Windows.switchToWindowTitle('StopWatch') // main window title

Exceptions 3: Windows Application does not Start

In this type of exception, the first thing that we suggest is to recheck your codes and algorithms. Ensure that the application must start usually. If everything seems alright, then definitely your application is lagging. It is taking a long time to start than it should. 

 

The main cause of this lag is that your application is heavy. Heavy in terms of loading. You may have added opening animations or video graphics that lead to the slow rendering of the app.

There is no need to remove or alter the animations. Just increase the default waiting time of the WinAppDriver. The driver timeouts after a certain amount of time. We must load our application before that.

Below is the throwback generally observed:

Unable to start application:

java.util.concurrent.ExecutionException: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for com.kms.katalon.core.windows.driver.WindowsDriverFactory

Solution

  1. Make sure you have the latest version of Appium and WinAppDriver. If not, then you can install and update them from their respective websites.
     
  2. To increase the default timeout, go to Project Settings > Desired capabilities > Windows and add the desired timeout: "ms:waitForAppLaunch": "<required time>." By default, this time is 30 seconds. You may increase it according to your requirements.

 

If the issue persists even after increasing the timeout, then WinAppDriver might be having trouble identifying the primary application window. The primary application window is the first window that appears on the screen when the app starts. The application will not start until identified correctly. 

It is like you have reached your house but cannot find the entrance gate. A simple solution is to set the primary window title in the startApplicationWithTitle keyword manually. This method starts the windows application at the given absolute path.

If you are using the Windows Spy/Record Utility, you can add the application title in the Application Title field and start again.

Issues And Limitations Of Katalon

“Once we accept our limits, We go beyond them.”

As Good as Katalon can be, it still has some limitations. Every software application does. 

Possessing the knowledge of these limitations will save you from exceeding them.

Mentioned below are some of the limitations you must consider while testing your application.

  1. Click Offset, Right Click Offset, and Mouse Over Offset keywords do not work on Safari. Using them will give errors.
     
  2. Safari is not supported on both Windows and macOS when using Execute test from a specific step.
     
  3. Katalon Studio Console Mode cannot display Unicode characters due to Windows CMD not supporting UTF-8 encoding.
     
  4. Special characters convert to UTF-8 format when test reports export to PDF files. Katalon plans to support custom fonts in future version releases.
     
  5. When you use a test suite with a larger data file, Katalon refuses execution and throws an error.
     

Frequently Asked Questions

What is Katalon Studio? 

The automation testing software tool Katalon Studio was created by Katalon, Inc. It was initially released in the year 2015. It is built on top of the open-source Selenium and Appium automation frameworks with a specialized IDE interface.

This Software as a Service (SaaS) is mainly used to create automated test scripts for UI without coding.

Which Operating systems support the Katalon Automation testing tool?

Microsoft Windows (64-bit), Linux, and macOS support the Katalon Studio Automation testing tool.

Is using Katalon Studio hard? What skills are pre-required?

Katalon Studio is a rather basic, easy automation testing solution. It does not require sophisticated programming abilities to develop automated tests. It has a scripting mode for more experienced users and test cases.

What is the use of the setText keyword?

The setText keyword is used parallelly with the sendKeys keyword. It clears the currently filled text in the forms and replaces it with the input text. This keyword is used in the filling of forms while testing applications.

What framework is used in Katalon Studio?

Groovy is a Java-based language Katalon Studio uses it. It requires loading numerous libraries to parse test data, objects, and logging.

Conclusion

Hey Ninja! Did you find what you were looking for? We hope you will debug your issue soon.

We will conclude our discussion by summarizing everything we discussed in this blog.

We dived into Katalon’s Windows Automation Troubleshooting. We explored common and rare exceptions and learned the reasons why they occur. Troubleshooting of timeout and starting issues was covered.

We then took a quick peek at the limitations and problems of the Katalon Windows testing tool. In the end, we also discussed some frequently asked questions along with their brief answers.

We sincerely hope the above discussion helped you understand how to detect and resolve errors and exceptions while dealing with Web Automated testing in Katalon Studio.

If you wish to learn more about Katalon and its various testing divisions, you can refer to blogs on web services test designmobile test designwebUI testing, and projects.

Visit our website to read more such blogs. Make sure you enroll in our courses. You can take mock testssolve problems, and interview puzzles. Also, you can check out some exciting interview stuff- interview experiences and an interview bundle for placement preparations. Do upvote our blog to help fellow ninjas grow.

Keep Grinding! 💪

Happy Coding! 💻

Live masterclass