Ranorex Help Center

How can we help you?

Adapting an Existing Repository

During lessons one through three you created a repository by recording a manual test scenario. For each UI element used during recording, a new item was created within the repository. By default a new Ranorex Studio project contains one repository file (*.rxrep) which can be used by multiple recording or code modules.
File view of a repository

File view of a repository



Integrated repository view within the Recorder

Integrated repository view within the Recorder

Screencast Watch the screencast (http://youtu.be/uYqruaEUcCU) on organizing and optimizing a Ranorex Repository to find out how to best use simple and rooted folders.


You can access and edit the repository (directly) in the recorder view by double clicking the file ('MyFirstTestProjectRepository.rxrep') in the projects view as shown in the figures above.

Renaming Repository Items

Each UI element within the repository can have a logical user-defined name. The more logical names you use the easier it is to understand test automation code and report files. In order to rename an item in the repository, first select it and then click the item to enter edit mode. Optionally you can use the keyboard shortcut <F2> to edit the names.


Renaming of repository items

Renaming of repository items

Creating Logical Folders

The more objects you have in a repository the more structured and organized it should be. For this reason you can structure and group UI elements which logically belong together. Add a new 'Simple Folder' using the drop-down button in the repository toolbar.


Adding a 'Simple Folder' to the repository

Adding a 'Simple Folder' to the repository

Repository using two logical folders to group input fields and buttons

Repository using two logical folders to group input fields and buttons

Repository Structure - Types of Elements

A repository can have the following types of items:


Ranorex repository structure

Ranorex repository structure


Application Folder #1 Represents a top level application, a dialog or a context menu

Rooted Folder #2 Contains GUI elements having the same parent (i.e. RanoreXPath prefix)

Simple Folder #3

Used to group items

Adapter Item #4

Represents a Ranorex adapter (Button, ListItem, TextBox, ComboBox, etc.)

Use the 'Add New Item' button in the toolbar to add new items manually.


Searching For Elements

Use the 'Search' text box to find elements in the repository. Specify where to search for the given text value using the drop-down menu.
Specify whether to search in 'Names', 'Paths' or to 'Search All' elements

Specify whether to search in 'Names', 'Paths' or to 'Search All' elements

Search result for text 'button' used in names and paths

Search result for text 'button' used in names and paths

Repository Cleanup

The repository's 'Cleanup' button is used to search for currently unused items and to delete these items afterwards. Unused items mean they are neither used by recording modules nor by code modules.

Considering the situation that a user clicked unintentionally on some desktop icons during the recording, these icons would have been added to the repository as well. Cleaning up would be beneficial in that case.

Another situation where cleaning up is helpful is when UI elements which are still linked from the repository are no longer part of the software under test.

In order to keep your repositories as tidy as possible, use the 'Cleanup' functionality from time to time to avoid disorder.


The 'Cleanup' button

The 'Cleanup' button



In the 'Cleanup' dialog unused repository items are listed and checked automatically. Uncheck items if you do not want to delete them.


After clicking the 'Cleanup' button a dialog is shown with the repository elements currently not in use by any of recording or code modules within the project

After clicking the 'Cleanup' button a dialog is shown with the repository elements currently not in use by any of recording or code modules within the project


Note The cleanup functionality only searches for used items in the solution the repository is located in. There is no check if items are used in other solutions referencing the repository.

Find Repository References

In Lesson 7: Code Modules you will learn about how to use repository items in code modules. Before you modify an existing repository item (e.g. the item's name or the item's RanoreXPath), it might be necessary to check which code files use that item. Use the context menu item 'Find All Code References' to list all code files using a certain repository item. You can choose whether to search in all the code files or only in the user code files.


Search for references of repository item KeePass

Search for references of repository item KeePass

Search result - simply double-click a result item to open the code file

Search result - simply double-click a result item to open the code file

Next to finding repository items in code you can also search all test modules.
Search for references of a repository item in all test modules

Search for references of a repository item in all test modules

Search result - simply click a result to open the test module

Search result - simply click a result to open the test module