English|Deutsch
Subscribe Ranorex Announcements Feed Ranorex LinkedIn Ranorex twitter Ranorex Facebook Ranorex Google+

Adapting an Existing Repository

During lessons 1-3 you already created a repository by recording a manual test scenario. For each UI element used during the 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.

Repository file view within Ranorex Studio
File view of a repository
Repository view within the Recorder
Integrated repository view within the Recorder

You can access and edit the repository within a recording or 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 fist 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 at the repository toolbar.

Adding a 'Simple Folder' to the repository
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 #1Represents a top level application, a dialog or a context menu
Adapter Item #2Represents a Ranorex adapter (Button, ListItem, TextBox, ComboBox, etc.)

Simple Folder #3

Used to group items
Rooted Folder #4Contains GUI elements having the same parent or RanoreXPath substring

Use the 'Add New Item' button at 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 item names
Search result for text 'button' used in item names

Repository Cleanup

The repository's 'Cleanup' button is used to search for currently unused items and then to delete items which are not used by a recording or code module. Use the Ranorex Spy to add some new elements to your repository like two desktop items shown in the figure below.
New items from the system desktop added to the repository
New items from the system desktop added to the repository
After clicking the 'Cleanup' button a dialog shows which elements of the repository are currently not in use by any of recording or code module within the project.
Select items to delete from the repository
Select items to delete from the repository

Find Repository References

In lesson 7 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 in which code files the item is used. Use the context menu item 'Find All Code References' to list all code files using a certain repository item.

Search for references of repository item VipApp
Search result - Simply double-click a result item to open the code file