Identify controls by index
To create stable, conclusive tests, you need to make sure that Tosca Cloud can reliably identify and interact with screen elements in your application. We call these elements controls.
There are different ways to identify controls. This topic takes you through identifying controls by index, where you identify a control by its position in the index of a page. It's a good solution for controls that exist in multiple places on the same screen.
Access this option
The option to identify controls by index is only available in the Advanced View of Tosca XScan.
Use this option
To identify a control by index in the Advanced View, follow these steps:
-
Select the control you want to identify in the tree view of the scan. Then, select Identify by > Index from the ribbon menu.
-
In the Identify By Index pane, select the index checkbox.
Considerations
When it comes to identifying controls by index, keep these things in mind:
-
The selected control's properties. Tosca Cloud creates the index by counting all controls on the page that have these specific properties and property values. You can fine-tune the index by selecting specific properties or changing property values beforehand.
-
The changes you still expect. Adding or removing indexed controls from your application changes the index. If that happens after the scan, Tosca Cloud might not find the right instance of the control at runtime.
What's next
Identification by index not working for what you need? No problem—try properties, images, or anchor.
However, if you're happy with your module, then it's time to start creating tests.