Once items are part of your repository, you have several ways to edit and manage them. This article describes the available options.
Rename repository items
Ranorex Studio assigns repository item names automatically based on what the corresponding UI elements are called within the tracked application. Sometimes, these names can be cryptic or too generic, making it hard to navigate the repository. You can rename repository items to make it clearer what they do.
- Select the repository item and press
F2 - Rename the repository item and press
Enter - The name of the repository item is changed
Copy/move/delete repository items
Repository items can be copied, moved, and deleted as usual. However, moving and deleting can cause issues if:
- You move repository items across logical boundaries in the repository.
- You delete repository items that are linked to one or more actions.
Move across logical boundaries
Ranorex organizes repository items in logical groups called folders. A folder always contains references to UI elements that share the same base position in the UI. This concept is explained in detail in Structure repository items.
When you move a repository item from one folder to one with a different base path, you also alter the repository item’s base path. As a result, Ranorex likely is not able to find the UI element anymore, and any actions linked to this repository item will fail during test execution. Ranorex will ask you for confirmation when you attempt to move an item in such a way.
- When you move a repository item from one folder to another with a different base path.
- Ranorex displays a dialog explaining the consequences and asks you for confirmation.
Delete a linked repository item
When you delete a repository item that is linked to one or more actions, the actions will stop working. If you want to remove unused repository items, use the Cleanup function instead
- Select a repository item and delete it.
- The repository item is removed from the actions it was linked to. The actions won’t work anymore.
Update screenshot
When a repository item is created, a screenshot of the corresponding UI element is also saved. It can be viewed in the repository. When the UI element changes in appearance, you may need to update it.
The option Update screenshot allows you to do this quickly without having to retrack the UI element.
- Update screenshot option: Right-click the repository item whose screenshot you want to update and click Update screenshot.
- The screenshot: If the UI element can be found and is visible, the screenshot is updated.
- Error message: If the path is invalid or the AUT is not running or not showing the element, an error message is displayed.
Highlight element
Sometimes it can be hard to determine exactly which UI element a repository item references. The Highlight element option helps you verify the link.
- Right-click the desired repository item and click Highlight element.
-
The UI element is highlighted in the application for a few seconds with a blinking red frame
Add validation screenshot
This option is useful for image validations. Normally, when you record an image validation, the validation screenshot will be created automatically. However, you can also add the validation screenshot manually. You can also add several validation screenshots to a single repository item. This is useful when image-validating the same UI element in different states (for example, a traffic light status field). The option Add validation screenshot lets you do this.
- Right-click the repository item and select Add validation screenshot.
- A screenshot of the current state of the UI element is added to the corresponding repository item
Save screenshot
Once a validation screenshot has been added to a repository item, you can save it to any destination on your system. To do so, right-click the screenshot and click Save screenshot.
Find references
In large test projects, a repository item may be referenced in many modules and/or pieces of code. It can be useful to check where exactly the repository item is used before you make changes to it. The two context menu options, Find test module references and Find code references allow you to do so.
Find test module references
This option shows you all test modules where the repository item is referenced.
- Right-click the desired repository item and select Find test module references.
- The references appear in the search results at the bottom of Ranorex Studio.
Finding code references
This option shows you all code instances where the repository item is referenced.
- Right-click the repository item, select Find code references, and select one of the two options.
- The code references are displayed in the search results at the bottom of Ranorex Studio.
Repository item properties
Each repository item also has a set of properties that can be configured in its Properties panel.
- Right-click the desired repository item and select Properties.
- The properties are open to the right of the repository.
List of properties
| Property name | Property description |
| Absolute path | Represents the path to the repository item including the paths of all parent folders. Read-only. |
| Adapter type | Lets you select the adapter type. By default, Ranorex automatically selects the most appropriate adapter. |
| Effective timeout | The sum of all search timeouts applied to the specific repository item and all its parent folders. Read-only. |
| Comment | Lets you add a comment to the repository item. |
| Live element | When the UI element represented by the repository item is live, i.e the AUT is opened and the element visible, this property displays a range of different parameters for it. |
| Name | The name of the repository item. |
| Search timeout | Defines the amount of time Ranorex searches for an element before an exception is thrown. |
| Use ensure visible |
|
| Use cache |
Only available for app folders and rooted folders.
Default values for automatically created folders are set according to the technology of the UI element. In most cases, this means False. |