- Release Notes
- Getting Started
- Setup and Configuration
- Automation Projects
- Dependencies
- Types of Workflows
- File Comparison
- Automation Best Practices
- Source Control Integration
- Debugging
- The Diagnostic Tool
- Workflow Analyzer
- About Workflow Analyzer
- ST-NMG-001 - Variables Naming Convention
- ST-NMG-002 - Arguments Naming Convention
- ST-NMG-004 - Display Name Duplication
- ST-NMG-005 - Variable Overrides Variable
- ST-NMG-006 - Variable Overrides Argument
- ST-NMG-008 - Variable Length Exceeded
- ST-NMG-009 - Prefix Datatable Variables
- ST-NMG-011 - Prefix Datatable Arguments
- ST-NMG-012 - Argument Default Values
- ST-NMG-016 - Argument Length Exceeded
- ST-DBP-002 - High Arguments Count
- ST-DBP-003 - Empty Catch Block
- ST-DBP-007 - Multiple Flowchart Layers
- ST-DBP-020 - Undefined Output Properties
- ST-DBP-023 - Empty Workflow
- ST-DBP-024 - Persistence Activity Check
- ST-DBP-025 - Variables Serialization Prerequisite
- ST-DBP-026 - Delay Activity Usage
- ST-DBP-027 - Persistence Best Practice
- ST-DBP-028 - Arguments Serialization Prerequisite
- Variables
- Arguments
- Imported Namespaces
- Recording
- UI Elements
- Control Flow
- Selectors
- Object Repository
- About Object Repository
- Creating an Object Repository
- Reusing Objects and UI Libraries
- Data Scraping
- Image and Text Automation
- Automating Citrix Technologies
- RDP Automation
- SAP Automation
- VMware Horizon Automation
- Logging
- The ScaleCoordinates Migration Tool
- The ScreenScrapeJavaSupport Tool
- The WebDriver Protocol
- StudioPro
- Extensions
- Troubleshooting
Creating an Object Repository
An object repository is a collection of elements grouped by applications, versions, and screens that can come from a:
- local project, i.e. the local repository.
- library, i.e. UI Library dependencies to the current project.
A Local Repository can be created either by:
- using the Capture Elements recorder to capture UI descriptors.
- manually, by creating applications, screens, and elements directly in the Object Repository panel.
A UI Library can be created by:
- extracting the local repository from any project into a library project and publishing it as a NuGet package.
-
starting from a new library, building the repository there, and publishing it as a NuGet package.
You can then use the UI Library NuGet packages and add them as dependencies to your processes.
Important: The Capture Elements recorder only records objects for reuse in projects, the recorder does not generate a workflow in the Designer panel.
In a library or process, click the Capture Elements button in the Object Repository to start recording objects.
The Capture Elements recorder uses the Unified Target technology from inside the UIAutomation.Activities pack version 20.10 and higher, to capture targets and anchors with a certain degree of accuracy for each selector, image, or anchor.
UI Elements are captured together with a Selector, Fuzzy Selector, and Image, each with a degree of accuracy. You can choose to keep only one or all of these target elements. The same is applicable for anchor elements associated to each UI element in the application.
Applications, screens, and elements should be given descriptive names from within the Capture Elements recorder to make them easily recognizable in the Object Repository.
A selector in an application can represent a button, a checkbox, a text field, toggle, list box, any type of element that can interact with the Robot. The captured element can be defined from within the Capture Elements recorder.
From the Type drop-down list, search and pick the type suitable for each element. In the Object Repository the element receives an icon specific to its type making it easier to distinguish between objects.
After capturing elements, click the Save objects to library button, and the objects are added to the Object Repository.
- To add additional elements, right-click a screen or element in the repository, and select Create Element. To add additional screens, right-click the application and select Create Screen.
- To record objects directly under an application or screen, right-click any application or screen, and then select Capture Elements.
You can create your own repo from within the Object Repository panel by defining the application, each screen, and element manually.
From the Object Repository panel, click the plus sign in the Descriptors tab or right-click Project Descriptors in the same tab and select Create Application. The Create Application window opens:
Add a unique application name, version, and description. Click Create application. Your application is visible in the Descriptors tab, under Project UI Descriptors.
In the Descriptors tab, select your application, click the plus sign or right-click your application and select Create Screen. The Add Screen window opens:
Add a unique name for the screen, and a description. Indicate the screen that you would like to automate, and edit the captured element with Unified Target:
- change the application path if needed.
-
add application arguments.
When completed, click Create screen.
In the Descriptors tab, select your app screen, click the plus sign in or right-click the screen and select Create Element. The Add Element window opens:
From the Descriptor Type section click Indicate element to use Unified Target to indicate and capture the element from the screen.
Add an intuitive name in the Element Name field, and select the type of the element from the drop-down list under Type. Click Save when done.
- To edit an element from the Object Repository, right-click it, and then select Edit Element, or double-click the element in the tree.
- To edit the descriptor of an element, use the Edit Descriptor option from the Edit Element window, or right-click the element in the tree, and then select Edit Descriptor.
If the Object Repository is enforced in your instance of Studio (as per instructions in the About Object Repository page), when using the App/Web Recorder, the generated activities do not automatically reference descriptors from the repository.
At the level of activities, an informative tooltip informs you to add descriptors to the Object Repository or use existing ones.
To do so, click on the icon inside the activity, and follow the steps for adding or reusing descriptors, or select Options > Add to Object Repository to add the element to the Object Repository.
After you've created an object repository you can add more UI elements directly from the Designer panel.
In the Designer panel add an activity that supports selectors, like Click or Type Into. Make sure that the added activity is within a Use Application/Browser activity.
Within the body of the activity, click the Object Repository icon to open the Selection Options window. Capture the element, select Confirm and the Add Element to Object Repository window opens. Add a name to the element and click Save. Notice that the element is added to the Object Repository panel.
From the Object Repository, drag and drop an application, screen, or element on top of an activity in your workflow. The object's image, arguments, and other details are automatically added to the activity.
MyAppScreen
object on top of the Use Application/Browser activity. The application path was automatically added to the activity.
Alternatively, drag an object on top of the plus sign inside the workflow to open a list of compatible activities. Select the activity and the object is automatically added. Inside the process, the activity receives the following label: activity name + object name.
After the object is added, the activity receives the descriptor properties from the Object Repository, visible in the activity's Properties panel.
- To edit the descriptor, click Show at the top of the Properties panel to go to the Object Repository where you can use the Edit Descriptor option.
-
To remove the link between the activity and the Object Repository, click Unlink at the top of the Properties panel. When the Object Repository is enforced, unlinking removes the target from the activity.
Once objects are added to the workflow, the UI Activities tab in the Object Repository panel displays the activities and the objects they contain in a hierarchical order. If they are not visible, please save the project and check again.
The workflows are marked:
- with a gray dot, if at least 1 activity from the workflow file references a UI Descriptor from the Objects panel.
- with a blue dot, if all activities from the workflow reference UI Descriptors from the Objects panel.
The UI activities are marked:
- with an empty dot, if the activity does not reference a UI Descriptor from the Objects panel.
- with a blue dot, if it references a UI Descriptor from the Objects panel.
Descriptors can be edited from the Object Repository in two scenarios that we'll refer to as "online" and "offline" editing:
- online editing - the application or browser can be accessed on the current machine. The app/browser is displayed on the screen, allowing elements to be selected again or modified.
- offline editing - the application or browser cannot be accessed on the current machine, either the app is not installed, or the machine is offline. The element's selectors are made visible allowing changes to be made.
In the Descriptors tab, right-click an element and select Edit Descriptor. The selection screen opens allowing you to capture a different element, edit selectors, and anchors.
The same can be achieved by clicking on the Edit Descriptor button from within the Edit Element window.
The same steps from online editing apply here as well. In the Descriptors tab, right-click a screen or element and select Edit Descriptor.
Offline editing offers the option to make changes directly to the element descriptor settings. However, you cannot indicate new elements. To do so make sure the application/browser is opened in the correct state.
Whenever you indicate a screen or UI Element which is already referenced in the Object Repository either under Project UI Descriptors or UI Libraries, the match is automatically detected and the following window is prompted:
The following options are available:
- Reuse - adds the matching descriptor from the Object Repository to the current activity.
- Create New - opens the options window for creating a new screen/element or updating an existing one in the Object Repository.
- Cancel - keeps the currently indicated selector inside the activity, without making any changes to objects in the repository.
Indicating a screen searches for a corresponding UI descriptor, while indicating a target element searches for a matching UI descriptor. When using the Recorder, corresponding matches for screen and elements are searched within the local UI library from Project UI Descriptors or the imported dependencies from UI Libraries.
To increase their degree of reusability, you can use variables in descriptors.
You can edit a target, add variables to it, and then add it to the Object Repository, or you can add variables to selectors in existing screens or elements from the Object Repository. Whenever you add a descriptor that contains a variable to a process, make sure to create the variable in the process, otherwise the expression cannot be read.
To add a variable to a descriptor selector, right-click the element inside the Object Repository, then select Edit Descriptor and add the variable from the Selection Options window.
<name='{{VarNumber}}'/>
adds the value of the variable VarNumber
to the name
attribute in the selector.
In the below example, we used a variable inside the Browser URL field of the Use Application/Browser activity, and then added the target to the Object Repository as a screen object. In this way, we make sure the descriptor accounts for cases in which the URL changes.
- Creating a Repository by Capturing Elements
- Descriptor Properties
- Element Types
- Creating a Repository From the Object Repository Panel
- Create a UI Application
- Create a Screen
- Create a UI Element
- Using Object Repository With Recorders
- Add Elements From Activities to a Repository
- Use Objects in Current Project
- Edit Descriptors
- Online Editing
- Offline Editing
- Resolve UI Descriptors
- Variables in Descriptors
- Highlight Elements