Each Ranorex repository represents file based mapping information and targets to centralize GUI element identification information for easier maintenance. There is no need to change test automation code which is caused by changing names or other identification attributes within the application under test.
Repositories could contain following type of items:
![]() | Application folder #1 | Represents a top level application or dialog |
![]() | Adapter item #2 | Represents a Ranorex adapter (Button, ListItem, TextBox, ComboBox,...) |
![]() | Normal folder #3 | Used to organize items |
![]() | Rooted folder #4 | Contains GUI elements having the same parent or RanoreXPath substring |
The more objects you add to a repository the more structured and organized it should be. For this reason the repository provides two types of folders for structuring and grouping GUI elements which logically belong together.
The commonly used folder type should be a so-called rooted folder. This type of folder collects GUI elements having the same parent in order to avoid the use of multiple RanoreXPath substrings.
Use the toolbar buttons to create rooted or normal logical folder types within your repository and use simple drag&drop mechanism to move existing repository items into them.
// Close the application form directly vipUIObjects.VIPApplication.MainForm.Self.Close(); // ... or activate it if it is required vipUIObjects.VIPApplication.MainForm.Self.Activate();
' Close the application form directly vipUIObjects.VIPApplication.MainForm.Self.Close() '... or activate it if it is required vipUIObjects.VIPApplication.MainForm.Self.Activate()
Create a new folder or a new rooted folder by clicking one of the provided toolbar buttons. Add an existing repository item to your folder using the drag and drop functionality supported through Ranorex Spy.
The repository browser provides two ways to check the RanoreXPath expressions of repository items:
Both can help to check the RanoreXPath expression of an object item and highlight the UI element if the path is valid.
Turn on 'Highllight Repository Item' using the toolbar button to browse quickly through your object tree to get a better understanding of the repository structure.
Use the context menu item 'Highlight element' to search for a specific object item. After clicking the menu item, a pop-up dialog appears showing the search progress. That's a useful way to validate a RanoreXPath expression especially for context menu items or other pop-up windows requiring a manual trigger to bring in front. Simply open the related context menu or pop-up window manually. The UI element will be highlighted if the searched item is part of the window.
Read more about how to validate items within code here.
To change the default search timeouts used for the repository simply open the configuration dialog by clicking toolbar button.
Simple adapt the values of the 'Repository Defaults' tab to specify the defaults for repository folders and items. Also uncheck the 'Enable folder caching' to turn off folder caching for all items by default. Uncheck the checkbox 'Enable folder autogeneration' to prevent the repository from creating rooted folders automatically.
To rename the class name or the general namespace of the automatically generated source code, change the values within the 'Current Repository' tab.
In some situations,
repository items cannot be found because the caching information of the
item's parent folder is incorrect. In such cases, replaying the steps
involving these items may only work part of the time or only with long
delays.
This is caused by a fallback mechanism which is used to
search for an item without using the cache if the first attempt fails.
If this occurs, it is recommended to disable the folder cache for the
item's parent folder by setting the 'Use Cache' property to 'False'.
A Ranorex Repository can be created in different ways. The Repository editor is available within Ranorex Spy, Ranorex Studio and Ranorex Recorder. Irrespective of the context, how one works with the Repository remains the same.
To reuse a Ranorex Repository within a Ranorex Studio project or within a Ranorex recording save your repository as a file (*.rxrep) by clicking the ‘Save’ button. Simply add the saved repository to an existing Ranorex Studio project. Click here to learn more about Ranorex repositories within Ranorex Studio.
Toolbar short cuts |
||
![]() | New Folder | Creates a new folder to group items belonging logícally together |
![]() | New Application Folder | Creates a new Application Folder |
![]() | New Rooted Folder | Creates a new rooted folder to group items having the same parentage |
New Item |
Adds a new unspecified item | |
Copy Item |
Copies the selected item(s) into the clipboard | |
Paste Item |
Inserts the item(s) from the clipboard | |
Undo |
Undo the last action within the repository | |
Redo |
Redo the last action within the repository | |
![]() | Delete Item |
Deletes the currently selected item |
![]() | Load Repository | Opens an existing repository |
![]() | Save current Repository | Saves the current repository |
![]() | Save current Repository As... | Saves the current repository to a new file location or file name |
![]() | Show Item Properties | Opens an item related property view |
![]() | Configuration | Opens the configuration dialog |
![]() | Generate Code | Generates C#, VB.NET or IronPython source from the current repository |
![]() | Highlight Repository Item | When switched on highlights visible items on the system desktop |
Online User Guide
download as: PDF
