As your test grows, the repository can contain many items. Ranorex Studio automatically creates some folders for you, such as app folders and root folders, to organize repository items based on the structure of the application under test.
In larger repositories, you may want more control over how items are organized. This article explains the available folder types and how to use them to structure repository items more clearly.
Folder types in the repository
Ranorex Studio supports the following folder types:
- App folders
- Rooted folders
- Simple folders
Each folder type serves a different purpose.
App folders
App folders are top-level folders in the repository tree. They represent the highest-level container for repository items and cannot be placed inside another folder.
- RxMainFrame is the top-level folder that contains all UI elements of the Ranorex Studio Demo Application
- List1000 is the top-level folder that contains all selectable items in the Department drop-down
Create an app folder
To add an app folder:
- In the Repository view, right-click an empty area in the Item column.
- Click Add new item > App folder, you can also press
Ctrl+P. - The new app folder appears with the default name.
Rename an app folder
- Select the desired app folder and press
F2 - Enter the new name
Rooted folder
Rooted folders represent a distinct area of the UI that contains multiple related UI elements. All repository items inside a rooted folder share the same base path.
For example, a rooted folder named RxTabStandard might represent the Test database tab in the Demo Application. All items inside that folder inherit the rooted folder’s base path.
- RxTabStandard: The rooted folder and what it represents in the UI of the Demo Application, i.e. the Test database tab. All items in the rooted folder share the rooted folder’s path.
- Repository items in rooted folder: Repository items represent the UI elements in the left part of the Test database tab, which in turn is represented by the rooted folder.
To add a rooted folder:
- Right-click where you want to add the rooted folder
- Click Add new item
- Click Rooted folder, or press
Ctrl+R
Group items in a new rooted folder
You can also create a rooted folder from existing repository items. To group items in a new rooted folder:
- Select the repository items you want to group.
- Right-click the selection.
- Click Group in new rooted folder.
- Enter a name for the new folder.
Path specification of grouped repository items
- The rooted folder’s path is the shared path of the selected repository items.
- The repository items are displayed with their path endings.
Rename a rooted folder
- Click the desired rooted folder and press
F2 - Enter a name
Optimize a rooted folder path
A rooted folder’s path should always be the longest possible path shared among all the repository items it contains. To ensure this is the case, use the Optimize folder path option.
- The rooted folder SelectGender and its two repository items ButtonFemale and ButtonMale
- The base path of the rooted folder is empty
- Full paths of the two repository items. Note, they only differ in the control name at the end
- Right-click the rooted folder
- Click Optimize folder path
- Again, the same rooted folder SelectGender and its two repository items ButtonFemale and ButtonMale
- The base path of the rooted folder is now the longest shared path of the two repository items
- Only that portion of the path required to uniquely identify the two repository items is displayed
Simple folder
Simple folders do not have a base path. They are used only for manual organization, similar to folders in Windows Explorer.
You can use simple folders to group repository items by your own logical categories.
Unlike app folders and rooted folders, simple folders are never created automatically.
Create a simple folder
To add a simple folder:
- In the Repository view, right-click where you want to create the folder.
- Click Add new item > Simple folder.
You can also pressCtrl+D. - Enter a name for the folder.
- Move or add repository items to the folder as needed.
When to use each folder type
Use:
- App folders for top-level application containers
- Rooted folders for groups of items that share the same UI base path
- Simple folders for manual, logical organization without path inheritance