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.
Editing saved elements¶
Saved elements properties can be edited via the "Edit" button once a saved element is selected.
In edit mode the properties picker is active, clicking on saved elements, mouse selection or view structure will grab the element properties and show the changes.
In edit mode the "Update all" button is available. This updates the properties of the element if the element is currently present on the devices screen. This can be used to update the elements state when the apps state changes.
Discard changes, removes all changes made while editing an element.
Save as new¶
Allows you to take a baseline element, edit it and then save it as a new element. You will need to change the Name and API Id of element to make sure it is unique.
Setting default properties in the element repository, sets the properties when you use the element within the Test Editor.
Selected default properties for the element that will be used as default when an assertion is created within the test editor.
When the assertion is created the default properties for the element are selected.
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.
Renaming / Removing elements¶
- Element details - quick element details overview
- Dropdown - to open up rename and remove options
- Rename - rename the element
- Remove - remove the element from repository (not removed till changes are applied)