Automated UI testing is based on identifying UI elements and creating a representation that your automation can work with, for example, repository items with a unique RanoreXPath. In Ranorex Studio, this is accomplished through tracking UI elements.
Ranorex Studio supports multiple tracking methods. This article explains how tracking works when you record test steps.
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
This example records a simple click in the Test database tab of the Ranorex Studio Demo Application.
- The Test database tab in the demo application.
- The test database working environment.
Now let’s see how tracking by recording works.
- Start Ranorex Studio and create a new blank solution.
- Start the Demo Application and open the Test database tab.
- In Ranorex Studio, open the default recording module.
- Click RECORD.
Ranorex Studio is minimized, and the Recorder control center appears, indicating an active recording. - In the Demo Application, click the Female radio button.
- Click Stop in the Recorder control center.
Results
After you stop recording, Ranorex Studio shows:
- The actions table in the recording module, where the mouse-click action is linked to a repository item., e.g., 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 that repository item, which identifies the UI element in the AUT.
Tracking mechanism for tracking by recording
- While recording, Ranorex Studio monitors your 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.