activities
latest
false
UiPath logo, featuring letters U and I in white
UI Automation Activities
Last updated Oct 28, 2024

ObjectRepositoryTarget

This is a UI element identified as an ObjectRepositoryTarget. In comparison to the IElementDescriptor, this selector allows you to use Strings to access Object Repository elements. You can also access any descriptors, even if their names are duplicate in the repository, because the ObjectRepositoryTarget class allows you to specify the parents of the String descriptors that you're trying to use.
To use ObjectRepositoryTarget selectors, you must first create them, using the ObjectRepositoryTarget class, along with its constructors: ObjectRepositoryTarget(String, String, String, String), and ObjectRepositoryTarget(String[], String, String, String)

Definition

Namespace: UiPath.MobileAutomation.API.Models

Assembly: UiPath.MobileAutomation.API (in UiPath.MobileAutomation.API.dll)

Syntax

public class ObjectRepositoryTargetpublic class ObjectRepositoryTarget
The ObjectRepositoryTarget type exposes the following members:

ObjectRepositoryTarget constructors

These constructors initialize a new instance of the ObjectRepositoryTarget class.

Overloads

OverloadDescription
ObjectRepositoryTarget(string, string, string, string)Initializes a new instance of the ObjectRepositoryTarget class, enabling you to access up to the 4th level of object repository descriptors. When specifying the elementPath parameter, you should arrange parent-child relationships in a string format like "parentOfparent///parent///child", which allows traversal up to the 4th level.
ObjectRepositoryTarget(string[], string, string, string)Initializes a new instance of the ObjectRepositoryTarget class and enables you to access up to the 4th level of object repository descriptors, by taking an array of strings. When specifying the elementPath parameter, the parent-child relationship is represented like ["parentOfParent", "parent", "child"], offering an alternative way to access the hierarchical descriptors.

ObjectRepositoryTarget(string, string, string, string)

Initializes a new instance of the ObjectRepositoryTarget class, enabling you to access up to the 4th level of object repository descriptors. When specifying the elementPath parameter, you should arrange parent-child relationships in a string format like "parentOfparent///parent///child", which allows traversal up to the 4th level.
public ObjectRepositoryTarget(
	    string elementPath,
	    string appName = "***",
	    string appVersion = "***",
	    string screenName = "***"
)public ObjectRepositoryTarget(
	    string elementPath,
	    string appName = "***",
	    string appVersion = "***",
	    string screenName = "***"
)
elementPath String
The hierarchical path leading up to the specific element descriptor you're aiming to automate. It provides a way to trace the lineage from the highest level parent down to the target child element within the object repository. This is useful in scenarios where you have nested elements or a deep hierarchy within your Object Repository application.
This parameter takes the form of a string where parent-child relationships are separated by ///, such as "parentOfparent///parent///child".
appName String (Optional)
The name of the Object Repository application where you want to access the desired UI element.
appVersion String (Optional)
The version of the Object Repository application from where you want to access the desired UI element.
screenName String (Optional)
The name of the Object Repository screen from where you want to access the desired UI element.

ObjectRepositoryTarget(string[], string, string, string)

Initializes a new instance of the ObjectRepositoryTarget class and enables you to access up to the 4th level of object repository descriptors, by taking an array of strings. When specifying the elementPath parameter, the parent-child relationship is represented like ["parentOfParent", "parent", "child"], offering an alternative way to access the hierarchical descriptors.
public ObjectRepositoryTarget(
	    string[] elementPath,
	    string appName = "***",
	    string appVersion = "***",
	    string screenName = "***"
)public ObjectRepositoryTarget(
	    string[] elementPath,
	    string appName = "***",
	    string appVersion = "***",
	    string screenName = "***"
)
elementPath String[]
The hierarchical path leading up to the specific element descriptor you're aiming to automate. It provides a way to trace the lineage from the highest level parent down to the target child element within the object repository. This is useful in scenarios where you have nested elements or a deep hierarchy within your Object Repository application.
This parameter takes the form of a string array, with each parent and the target child as separate elements in the array, like ["parentOfParent", "parent", "child"].
appName String (Optional)
The name of the Object Repository application where you want to access the desired UI element.
appVersion String (Optional)
The version of the Object Repository application from where you want to access the desired UI element.
screenName String (Optional)
The name of the Object Repository screen from where you want to access the desired UI element.

ObjectRepositoryTarget properties

AppName

Property Value: String

The name of the Object Repository application where you want to access the desired UI element.

public string AppName { get; set; }public string AppName { get; set; }

AppVersion

Property Value: String

The version of the Object Repository application from where you want to access the desired UI element.
public string AppVersion { get; set; }public string AppVersion { get; set; }

ElementPath

Property Value: String

The name of the Object Repository UI element that you want to access.
public string[] ElementPath { get; set; }public string[] ElementPath { get; set; }

ScreenName

Property Value: String

The name of the Object Repository screen from where you want to access the desired UI element.
public string ScreenName { get; set; }public string ScreenName { get; set; }

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.