UiPath Documentation
activities
latest
false
Activités UIAutomation
Important :
Veuillez noter que ce contenu a été localisé en partie à l’aide de la traduction automatique. La localisation du contenu nouvellement publié peut prendre 1 à 2 semaines avant d’être disponible.

ObjectRepositoryTarget

Référentiel d'objets - Cible de référencement des éléments d'IU définis dans le référentiel d'objets dans les activités UI Automation.

Il s'agit d'un élément d'IU identifié comme étant un ObjectRepositoryTarget. Par rapport à IElementDescriptor, ce sélecteur vous permet d'utiliser Strings pour accéder aux éléments du référentiel d'objets. Vous pouvez également accéder à tous les descripteurs, même si leurs noms sont dupliqués dans le référentiel, car la classe ObjectRepositoryTarget vous permet de spécifier les parents des descripteurs String que vous essayez d'utiliser.

Pour utiliser les sélecteurs ObjectRepositoryTarget , vous devez d'abord les créer, en utilisant la classe ObjectRepositoryTarget , avec ses constructeurs : ObjectRepositoryTarget(String, String, String, String) et ObjectRepositoryTarget(String[], String, String, String)

Définition

Espace de noms: UiPath.MobileAutomation.API.Models

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

Syntaxe

public class ObjectRepositoryTarget
public class ObjectRepositoryTarget

Le type ObjectRepositoryTarget affiche les membres suivants :

Constructeurs RéférentielObjet cible

Ces constructeurs initialisent une nouvelle instance de la classe ObjectRepositoryTarget .

Surcharges

SurchargeDescription
ObjectRepositoryTarget(string, string, string, string)Initialise une nouvelle instance de la classe ObjectRepositoryTarget , permettant d'accéder au 4e niveau des descripteurs du référentiel d'objets. Lorsque vous spécifiez le paramètre elementPath , vous devez organiser les relations parent-enfant dans un format de chaîne comme « parentOfparent///parent///enfant », qui permet un parcours jusqu'au 4e niveau.
ObjectRepositoryTarget(string[], string, string, string)Initialise une nouvelle instance de la classe ObjectRepositoryTarget et permet d'accéder au 4e niveau des descripteurs du référentiel d'objets, en prenant un tableau de chaînes. Lors de l'indication du paramètre elementPath , la relation parent-enfant est représentée par ["parentOfParent", "parent", "enfant"], offrant une autre manière d'accéder aux descripteurs hiérarchiques.

ObjectRepositoryTarget(string, string, string, string)

Initialise une nouvelle instance de la classe ObjectRepositoryTarget , permettant d'accéder au 4e niveau des descripteurs du référentiel d'objets. Lorsque vous spécifiez le paramètre elementPath , vous devez organiser les relations parent-enfant dans un format de chaîne comme « parentOfparent///parent///enfant », qui permet un parcours jusqu'au 4e niveau.

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)

Initialise une nouvelle instance de la classe ObjectRepositoryTarget et permet d'accéder au 4e niveau des descripteurs du référentiel d'objets, en prenant un tableau de chaînes. Lors de l'indication du paramètre elementPath , la relation parent-enfant est représentée par ["parentOfParent", "parent", "enfant"], offrant une autre manière d'accéder aux descripteurs hiérarchiques.

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.

Propriétés de la cible du référentiel d’objet

AppName

Valeur de propriété: String

Le nom de l'application Référentiel d'objets (Object Repository) où vous souhaitez accéder à l'élément d'IU souhaité.

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

AppVersion

Valeur de propriété: String

La version de l'application Référentiel d'objets à partir de laquelle vous souhaitez accéder à l'élément d'IU souhaité.

public string AppVersion { get; set; }
public string AppVersion { get; set; }

ElementPath

Valeur de propriété: String

Le nom de l’élément d’IU Référentiel d’objets auquel vous souhaitez accéder.

public string[] ElementPath { get; set; }
public string[] ElementPath { get; set; }

ScreenName

Valeur de propriété: String

Le nom de l'écran Référentiel d'objets (Object Repository) à partir duquel vous souhaitez accéder à l'élément d'IU souhaité.

public string ScreenName { get; set; }
public string ScreenName { get; set; }

Cette page vous a-t-elle été utile ?

Connecter

Besoin d'aide ? Assistance

Vous souhaitez apprendre ? UiPath Academy

Vous avez des questions ? UiPath Forum

Rester à jour