Automated UI testing is based on identifying UI elements and generating a representation of them that the automation tool can work with, for example, repository items with a unique RanoreXPath. In Ranorex Studio, this is accomplished through tracking UI elements.
This chapter explains the different ways you can track UI elements in Ranorex Studio.
Tracking is closely connected to the concepts of UI elements, repository items, RanoreXPath, and the Ranorex Spy tool. Review the following information to learn more about these topics:
- Ranorex Studio fundamentals > Repository
- Ranorex Studio advanced >UI elements
- Ranorex Studio advanced > Ranorex Spy
- Ranorex Studio advanced > RanoreXPath
Track by recording
When you record test steps in Ranorex Studio, UI elements are automatically tracked and therefore identified as you perform actions on them. This is tracking by recording. If you’ve read through the chapters in Ranorex Studio fundamentals, you should already be familiar with this method.
Test example definition
To explain tracking by recording, record a click on a UI element in the Test database of the Ranorex Studio Demo Application.
-
The Test database tab in the demo application.
-
The test database working environment.
Track by recording
Now let’s see how tracking by recording works.
-
Start the demo application and click the Test database tab.
-
Start Ranorex Studio and create a new blank solution.
-
Open the default recording module and click RECORD.
-
Ranorex Studio disappears and the Recorder control center appears, indicating an active recording.
-
In the Test database tab, click the Female radio button.
-
Click Stop in the Recorder Control Center.
Results
Once you stopped recording, Ranorex Studio displays the recording module view with the actions table and the current repository.
-
Mouse click action linked to the repository item RdbFemale that represents the Female radio button.
-
The repository contains the repository item RdbFemale. This repository item represents the Female radio button and is the result of the tracking process.
-
The RanoreXPath of the repository item. This path identifies the position of the UI element in the AUT’s UI.
Tracking mechanism for tracking by recording
- While recording, Ranorex Studio monitors user interactions with the UI and automatically tracks UI elements.
- When a user interaction occurs, Ranorex Studio identifies the targeted UI element and stores it as a repository item, which is a representation of the UI element.
- Usually, one repository item represents one UI element.
- Ranorex Studio recognizes when a UI element is used more than once and then reuses the corresponding repository item.