Structure repository items | Ranorex Studio User Guide
Help CenterUser GuideRanorex Studio fundamentals

Structure repository items

As your tests grow larger and more complex, your repository will also contain an increasing number of items. Normally, they are structured automatically, i.e. Ranorex Studio will create app folders and rooted folders automatically. However, this can become confusing with many items. You may prefer to structure the repository yourself. This chapter describes the types of folders available and how to use them to structure your repository.

In this chapter

    App folder

    App folders are root folders. They represent the top-level data container in the tree structure of repository elements. They can never be a child of another folder. In the example below, the folders RxMainFrame and List1000 are app folders.

    App folders and their GUI representation
    RxMainFrame

    • RxMainFrame is the top-level folder that contains all UI elements of the Ranorex Studio Demo Application.

    List1000

    • List1000 is the top-level folder that contains all selectable items in the Department drop-down.
    Note icon

    Note

    To make use of app folders, you will need to have a basic understanding of ⇢ UI elements and the ⇢ RanoreXPath.

    Create an app folder

    Creating an app folder
    In the Item column, right-click in an empty area.
    Click Add new item > App folder or press Ctrl+P.
    The new app folder appears with the default name.
    tipp icon

    Hint

    You can also click Add new item > App folder in the menu bar of the repository view.

    Rename an app folder

    Renaming app folders

    Renaming app folders

    Select the desired app folder and press F2.
    Enter a name.
    Note icon

    Note

    Note that the controlname in the path of the repository item remains unchanged. Only the display name in the repository is changed.

    Rooted folder

    Rooted folders represent distinct parts of the UI that contain a set of individual UI elements. Repository items in a rooted folder all share the same base path, i.e. the path of the rooted folder. In the example below, the  RxTabStandard is a rooted folder.

    Rooted folder
    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 representing the UI elements in the left part of the Test database tab, which in turn is represented by the rooted folder.

    Create a rooted folder

    Creating a rooted folder
    Right-click where you want to add the rooted folder.
    Click Add new item.
    Click Rooted folder, or press Ctrl+R.
    tipp icon

    Hint

    You can also click Add new item > Rooted folder in the menu bar of the repository view.

    Group items in a new rooted folder

    You can also group existing repository items in a new rooted folder.

    Grouping existing repository items into a new rooted folder
    Select the repository items you want to group.
    Right-click them and click Group in new rooted folder.
    Name the folder. The repository items are grouped in 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 individual path endings.

    Rename a rooted folder

    Renaming a rooted folder
    Click the desired rooted folder and press F2.
    Enter a name.

    Optimize a folder’s 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.

    Non-optimized rooted folder path specification
    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.
    Optimizing rooted folder path
    Right-click the rooted folder.
    Click Optimize folder path.
    Optimized rooted 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. These folders allow you to use your own logical categories, like folders in Windows. Simple folders are never created automatically. They need to be created and managed manually.

    Creating a simple folder

    Creating a simple folder

    Right-click where you want to add the simple folder.
    Click Add new item > Simple folder or press Ctrl+D.
    Name the folder and fill it with repository items.