Windows Spy Utility in Katalon Studio
Windows Desktop app testing is temporarily unavailable in Katalon Studio 10.x. Please use version 9.x to access this feature. For more details, refer to the 10.0.0 release notes.
The Windows spy utility helps capture test objects quickly and allows you to specify several object properties and locator strategies.
This article introduces you to the components of the Windows spy utility in Katalon Studio.
Requirements
- WinAppDriver is running on the test machine. To learn how to set up and run WinAppDriver, see: Set up WinAppDriver.
The Windows spy utility
To open the utility, from the main toolbar, click on the Spy Windows Object button.
The Spy Windows Objects dialog is displayed as below:
Configurations
In the Configurations section, you can specify:
-
Configuration: the WinAppDriver URL and desired capabilities.
-
Application File: the absolute path to the Windows executable file (*.exe) of the testing machine. For Windows users, click on the Browse... button to locate the application file.
When the application under test (AUT) is started, the utility captures all available Windows objects on the current window of the AUT and displays them in the All Objects section.
All objects
The All Objects section shows a tree of all the objects of the AUT, including the associated Windows element names (highlighted in blue) and tag names.
To add a Windows object, check the checkbox on the left of the desired Windows object. The added object is then displayed in the Captured Objects section.
Screen view
When an object is selected in the All Objects section, the position of the associated element is highlighted in the Screen View. This helps verify the selected Windows element.
Captured objects
The Captured Objects section shows all the captured Windows elements you want to add to the Object Repository.
To view details about a captured object, click on it. The detailed information is displayed in the Object Properties section.
You can view and edit the object name, locator and properties before adding it to the Object Repository.
Object properties
The Object Properties section allows you to configure the following information:
- Object Name: the Windows object name.
- Locator Strategy: the type of object locator to identify the Windows element. To generate the object locator of the desired locator type, click on the Generate button.
- Locator: the generated object locator that can be customized.
- Properties table: all properties of the captured objects.
To add the captured objects to the Object Repository, click OK and select the target folder where you want to save the objects.
View and edit the captured objects
You can view and edit the locator and properties of a captured object in the Object view.
Go to Tests Explorer> Object Repository, and select the desired Windows object. Details about a captured object are displayed in the Object view as follows:
In the Object view, you can view and edit:
- Locator: the locator type and locator of the object.
- Object Properties: the properties of the object.