activities
latest
false
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.
UiPath logo, featuring letters U and I in white

Activités UIAutomation

Dernière mise à jour 6 oct. 2025

Connexion (Connection)

A Connection is a class that represents the connection that you create between a device and an application, using the Connect/ ConnectAsync APIs. This is the class that exposes all the APIs that you can use to automate mobile testing scenarios.

Pour créer une connexion, vous devez avoir un appareil et une application configurés. Le service d'automatisation mobile expose des API dédiées à la création et à la configuration d'appareils ou d'applications.

For example, to create and configure a device you can use the following APIs and their corresponding classes: CreateDevice, GetDevice, GetDevices, while for applications you can use the following APIs: CreateApplication, GetApplication, GetApplications.

Création d'une connexion

  1. Configure a device and an application. You can either do this directly in the code using CreateDevice and CreateApplication APIs, or within Mobile Device Manager.
  2. Créez une variable à l'aide du mot clé var . Par exemple, var connection.
  3. Invoke the mobile service on this variable using the Connect/ ConnectAsync API, and provide the device and application configured in the previous step as parameters:
    var connection = mobile.Connect(device, application)var connection = mobile.Connect(device, application)
    Remember, you can also use Connect/ConnectAsync with the device and application names configured in Mobile Device Manager:
    var connection = mobile.Connect("<deviceName>", "<applicationName>")var connection = mobile.Connect("<deviceName>", "<applicationName>")
  4. Une fois la variable configurée, utilisez-la pour appeler les API nécessaires et automatiser vos scénarios de test sur mobile.
    connection.Tap()connection.Tap()
  • Création d'une connexion

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

Obtenez l'aide dont vous avez besoin
Formation RPA - Cours d'automatisation
Forum de la communauté UiPath
Uipath Logo
Confiance et sécurité
© 2005-2025 UiPath Tous droits réservés.