Windows Record Tutorials
- From version 7.0, you can record a test on a Windows desktop application.
- From version 7.8, Katalon supports recording and locating a Windows element by its relative coordinates.
In the Recorder, the two buttons, including Click Element Offset and Right-click Element Offset are added to Possible Actions, and 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.
To start recording a Windows action, Click the Record Windows Action icon on the main toolbar of Katalon Studio.
The Windows Recorder dialog box is displayed. Specify the information at the CONFIGURATIONS section.
Configuration: where you can view and edit the
Application File: the absolute path to the
Windows Executable File (*.exe)of the testing machine. For Windows users, click Browse... button to locate the application file.
The Start button is enabled after the Application File text box is filled.
Click Start when you're done with the settings.
The specified Windows application is deployed and opened on a testing machine.
The Screen View dialog box is displayed to show the current screenshot of your application on the testing machine.
All the Windows objects in that screenshot are analyzed and organized in a tree at the Screen Objects section.
Click on any object in that tree and it's highlighted in the Screen View accordingly.
Select an element, then specify an action to perform at the Possible Actions section.
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 and clicking Highlight to verify if the new locator correctly identifies the intended object.
You can stop the application or start another application if needed. To reload the Screen View as well as Screen Objects, simply click on the Refresh Screen button.
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.
- Remember not to lock your screen while spying, recording or executing a test on a desktop application.
- You're recommended not to run multiple applications simultaneously.
- 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