Welcome to the Ranorex Support Portal

Manage repository items

Once they’re part of your repository, you have several ways to edit and manage repository items can be edited and managed. This chapter describes the options available.

In this chapter

Note Icon


The screencast “Manage repository items” walks you through information found in this chapter.
Watch the screencast now

Rename repository items

Ranorex Studio assigns repository items 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.

Renaming repository items
  1. Select the repository item and press F2


  2. Rename the repository item and press Enter.

  3. The name of the repository item has been 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.

Moving across logical boundaries

Ranorex organizes repository items in logical groups called folders. A folder always contains references to UI elements which share the same base position in the UI. This concept is explained in detail in the chapter ⇢ 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 won’t be 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.

Moving repository items across logical boundaries
  1. When you move a repository item from one folder to another with a different base path…

  2. …Ranorex will inform you about the consequences and ask you for confirmation.

Note Icon


This only applies to app folders and rooted folders. Simple folders are not affected because they don’t have a base path.

Deleting a linked repository item

When you delete a repository item that’s linked to one or more actions, the actions will stop working. If you want to remove unused repository items, use the Cleanup function instead

Deleting a repository item
  1. Select a repository item and delete it.

  2. The repository item is removed from 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.

Updating a repository item screenshot
  1. Update screenshot option

  • Right-click the repository item whose screenshot you want to update
  • Click Update screenshot
  1. The screenshot

  2. Failure message

  • The screenshot can only be updated if the path for the UI element is still valid and the containing application is running, with the UI element visible. If this isn’t the case, an error message is displayed.

Highlight element

Sometimes it can be hard to determine exactly which UI element a repository item references. When you click Highlight element, Ranorex Studio will highlight the UI element in the containing application. Of course, this will only work if Ranorex Studio can find the element, i.e. if the containing application is running and the path to the element is correct.

Highlighting a repository item
  1. Highlight element

  • Right-click the desired repository item.
  • Click Highlight element.
  1. The UI element is highlighted in the application for a few seconds with a blinking red frame.

Search for corresponding UI element
  1. Search for the corresponding UI element

  • Sometimes Ranorex may take a while to find the corresponding UI element.
  • If the path is incorrect or the containing application hasn’t been started, Ranorex won’t be able to find the element.

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.

Creating a validation screenshot
  1. Right-click the desired repository item.

  2. Click Add validation screenshot.

  3. A screenshot of the current state of the UI element is added to the corresponding repository item.

Note Icon


This option only works if the AUT is opened and the respective UI element is visible.

Save screenshot

Once a validation screenshot has been added to a repository item, you can save it to any destination on your system. You can then restore the saved screenshot using the ⇢ image editor.

Saving a repository screenshot
  1. 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. That’s why it can make sense 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.

  1. Right-click the desired repository item.

  2. Click Find test module references.

  3. 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.

  1. Right-click the desired repository item.

  2. Click Find code references and select one of the two options.

  3. 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.

Opening repository item properties
  1. Right-click the desired repository item.

  2. Click Properties.

  3. The properties open to the right of the repository.

List of properties

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 will automatically select 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.

CommentLets 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.

NameThe name of the repository item.

Search timeout
Defines the amount of time Ranorex will search for an element before an exception is thrown.

Use ensure visible
When set to Yes, forces the UI element the repository item represents to become visible during a test run. For example, the UI element may be at the bottom of a webpage and you would need to scroll to it first to see it. With this property enabled, Ranorex will do this automatically.
When set to Default, the property is inherited from the setting Use ‘Ensure visible’ by default in the General settings.
Use cache
Only available for app folders and rooted folders.
When this is True, Ranorex will cache the UI element represented by the folder upon finding it. This can speed up automation because Ranorex won’t search for the element’s path any longer. However, we recommend you set this to False if the UI element changes regularly. In these cases, caching would slow down the test run and cause a warning message in the report. This is because the cached element would not match the actual element, and Ranorex would search for it using the absolute path. This also applies to folders that return two or more UI elements. Ranorex will always cache the first UI element it finds and the rest would again be searched for using the absolute path, causing slowdowns.
Default values for manually created folders:
App folder: False
Rooted folder: False
Default values for automatically created folders are set according to the technology of the UI element. In most cases, this means False.



Get the latest test automation information right in your mailbox.


© 2024 Ranorex GmbH. All Rights Reserved