From version 7.0.0, Katalon supports the recording utility for Desktop apps testing. From version 7.5.0, Native Windows Recorder is available for Windows machines. This new-generation Windows Recorder gives you a seamless recording experience that is similar to Web Recorder.
- Your Katalon Studio version must be 7.5.0+
- You need an active Katalon Studio Enterprise license
- This feature is supported on Windows only
- Setting up WinAppDriver. If your machine hasn't installed it yet, open Katalon Studio and go to Tools > Windows > Install WinAppDrivers and follow the set-up wizard.
- Installing Microsoft .NET Framework 4.5.2 or later
From version 7.8, you can record and locate a Windows element by its relative coordinates.
In Native Windows Recorder, with the enabled coordinate-based recording,
rightClick actions are recorded as
rightClickElementOffset actions respectively. The following keywords are supported:
With coordinates-based recording, Katalon Studio records an element's relative coordinates in addition to its selector. For instance, you want to click on the red X part to close a tab in Notepad. Katalon Recorder records the button's offsets (its relative coordinates to its top-left corner) as a set of parameters representing an X and Y offset, and save them in clickElementOffset. It uses them to identify the exact location to perform a click action during runtime.
Without that element's offsets, the test engine can only click on the button's center, resulting in a failed test.
Right-click on the Windows Recorder icon and select Native Windows Recorder to open the Native Windows Recorder windows.
The Native Windows Recorder dialog box is displayed. Specify the information at the CONFIGURATIONS section.
Application File: the absolute path to the Windows Executable File (*.exe) on the testing machine. Click the Browse... button to locate the application file.
To start a UWP application, the application's execute file should be:
- ApplicationID if your app is published on Microsoft store
- PackageFamilyName!Application ID if your app is still in development.
Click Start deploy and open the specified Windows application.
When you hover over an element of the AUT, Katalon Studio highlights the identified object with a red rectangle.
When you perform an action on the AUT, the action is recorded in the Recorded Actions section. The list of available actions is the same as Katalon Studio's built-in keywords. You can add any action, call another test case, and/or use Custom Keywords.
All of the specified actions above are recorded at the Recorded Actions section.
In Captured Objects, you can view all elements captured during the recording session. Here you can customize the locator of a captured object by modifying it in the Locator tab of Object Properties. The captured objects’ locators are their absolute XPaths.
When you’re done with recording, click OK to save the recorded actions in Katalon Studio.
You will be prompted to save the captured objects in the Object Repository of Katalon Studio. Choose an existing folder or create a new one, then click OK to continue.
When you finish your recording session, export the recorded steps to a new test case.
Recorded objects and actions are saved in the test case.
Executing a test case
Remember to turn on the WinAppDriver before executing a test case.
Select the Windows icon in the Run button on the main Toolbar to execute the script.
The Windows test is executed with those recorded steps accordingly.