Adding or editing an element¶
To add an element to the repository several tools are available.
Suggested elements - elements are automatically suggested to you by Suitest based on your app's view structure.
Mouse selection - select and add elements by using the on-screen mouse pointer.
View structure - select and add elements directly from the view structure.
Search by property - select and add elements by their specific properties.
Manually by pressing the button.
To activate any of the repository tools you must be connected to a device and an application must be opened on the device.
Identifying properties are element properties that are used to look up the element during test execution. To add an element you must specify at least one identifying property.
The following identifying properties are available:
Think of the identifying properties as filters for elements. Every specified property will further reduce the set of matching elements. For example specifying both Text and Color will look for elements that have the text content and the corresponding color.
If your application supports several platforms, the element identifying properties may differ per platform. Suitest allows you to specify a separate set of identifying properties per platform. During the test execution Suitest will automatically determine the platform for which to load the identifying properties based on what platform is supported by the device.
Element property snapshot¶
When you add an element to the repository Suitest looks it up in the application's view tree and collects some data about the current state of that element. We call this data "a baseline snapshot of the element properties". When you later make assertions in your tests Suitest autocompletes them with the data from the baseline snapshot.
You can save one baseline snapshot per platform. To make sure that the data in the snapshot is trustworthy it is best to create the snapshot when connected to a device on which the application is known to work.