- Vue d'ensemble (Overview)
- Automatisation de l'interface utilisateur
- À propos du package d'activités UIAutomation
- Applications et technologies automatisées avec UI Automation
- Compatibilité du projet
- UI-ANA-016 - Extraire l'URL ouverte du navigateur
- UI-ANA-017 - ContinuerSurErreur (ContinueOnError) True
- UI-ANA-018 - Répertorier les activités d'OCR/d'image
- UI-DBP-006 - Utilisation du conteneur
- UI-DBP-013 - Utilisation abusive de l’automatisation Excel
- UI-DBP-030 - Utilisation de variables interdites dans les sélecteurs
- UI-DBP-031 : Vérification de l’activité
- UI-PRR-001 - Simuler un clic
- UI-PRR-002 - Type de simulation
- UI-PRR-003 - Ouverture d'une utilisation abusive de l'application
- UI-PRR-004 - Délais codés en dur
- UI-REL-001 - Idx volumineux dans les sélecteurs
- UI-SEC-004 - Données d’e-mail du sélecteur
- UI-SEC-010 - Restrictions d'applications/d'URL
- UI-USG-011 - Attributs non autorisés
- UX-SEC-010 - Restrictions d'applications/d'URL
- UX-DBP-029 - Utilisation d'un mot de passe non sécurisé
- UI-PST-001 - Niveau du journal d'audit dans les paramètres du projet
- Outil de migration de navigateur UiPath
- Zone de détourage
- Enregistreur de Computer Vision
- À propos des éléments d'interface utilisateur
- Propriétés des activités de l'interface utilisateur
- Exemple d'utilisation des méthodes de saisie
- Méthodes de sortie ou de capture de données d'écran
- Exemple d'utilisation de méthodes de sortie ou de capture de données d'écran
- Génération de tables à partir de données non structurées
- Capture relative de données
- À propos de l'automatisation des images et des textes
- Activités liées à la souris et au clavier
- Exemple d'utilisation de l'automatisation de la souris et du clavier
- Les activités de type texte
- Exemple d'utilisation d'automatisation de texte
- Activités de type OCR
- Activités de type image
- Exemple d'utilisation de l'automatisation d'image et d'OCR
- Index des activités
- Activer (Activate)
- Base d'ancrage (Anchor Base)
- Lier à un navigateur (Attach Browser)
- Lier à une fenêtre (Attach Window)
- Block User Input
- Légende (Callout)
- Vérifier (Check)
- Cliquer (Click)
- Cliquer sur l'image (Click Image)
- Déclencheur de clic image (Click Image Trigger)
- Cliquer sur le texte OCR (Click OCR Text)
- Cliquer sur le texte (Click Text)
- Déclencheur de clic (Click Trigger)
- Fermer l'application (Close Application)
- Fermer l'onglet (Close Tab)
- Fermer la fenêtre (Close Window)
- Context Aware Anchor
- Copier le texte sélectionné (Copy Selected Text)
- Element Attribute Change Trigger
- Élément existant (Element Exists)
- Étendue de l'élément (Element Scope)
- Element State Change Trigger
- Export UI Tree
- Extraire les données structurées (Extract Structured Data)
- Rechercher les enfants (Find Children)
- Rechercher l'élément (Find Element)
- Rechercher l'image (Find Image)
- Rechercher les correspondances de l'image (Find Image Matches)
- Rechercher une position de texte OCR (Find OCR Text Position)
- Rechercher l'élément relatif (Find Relative Element)
- Rechercher la position du texte (Find Text Position)
- Obtenir la fenêtre active (Get Active Window)
- Obtenir l'ancêtre (Get Ancestor)
- Obtenir l'attribut (Get Attribute)
- Obtenir les infos de l'événement (Get Event Info)
- Récupérer du presse-papiers (Get From Clipboard)
- Obtenir le texte complet (Get Full Text)
- Obtenir le texte OCR (Get OCR Text)
- Récupérer le mot de passe (Get Password)
- Obtenir la position (Get Position)
- Obtenir l'élément source (Get Source Element)
- Obtenir le texte (Get Text)
- Obtenir le texte visible (Get Visible Text)
- Revenir en arrière (Go Back)
- Avancer (Go Forward)
- Accéder à l'accueil (Go Home)
- Google Cloud Vision OCR
- Masquer la fenêtre (Hide Window)
- Mettre en surbrillance (Highlight)
- Déclencheur de raccourci (Hotkey Trigger)
- Pointer (Hover)
- Pointer sur l'image (Hover Image)
- Pointer sur le texte OCR (Hover OCR Text)
- Pointer sur le texte (Hover Text)
- Image existante (Image Exists)
- Indiquer sur l'écran (Indicate On Screen)
- Injecter du code .NET
- Inject Js Script
- Invoquer la méthode ActiveX
- Déclencheur de pression de touche (Key Press Trigger)
- Charger l'image (Load Image)
- Agrandir la fenêtre (Maximize Window)
- Microsoft Azure ComputerVision OCR
- Reconnaissance optique des caractères Microsoft (Microsoft OCR)
- Microsoft Project Oxford Online OCR
- Réduire la fenêtre (Minimize Window)
- Surveiller les événements (Monitor Events)
- Déclencheur de souris (Mouse Trigger)
- Déplacer la fenêtre (Move Window)
- Accéder à (Navigate To)
- Texte OCR existant (OCR Text Exists)
- Sur affichage de l'élément (On Element Appear)
- Sur disparition de l'élément (On Element Vanish)
- Sur apparition de l'image (On Image Appear)
- Sur disparition de l'image (On Image Vanish)
- Ouvrir l'application (Open Application)
- Ouvrir le navigateur (Open Browser)
- Actualiser le navigateur (Refresh Browser)
- Relire l'événement utilisateur (Replay User Event)
- Restaurer la fenêtre (Restore Window)
- Enregistrer l'image (Save Image)
- Sélectionner l'élément (Select Item)
- Sélectionner plusieurs éléments (Select Multiple Items)
- Envoyer le raccourci (Send Hotkey)
- Définir la zone de détourage (Set Clipping Region)
- Définir le focus (Set Focus)
- Définir le texte (Set Text)
- Placer dans le presse-papiers (Set To Clipboard)
- Définir l'attribut Web (Set Web Attribute)
- Afficher la fenêtre (Show Window)
- Déclencher le processus (Start Process)
- Déclencheur système (System Trigger)
- Prendre une capture d'écran (Take Screenshot)
- Tesseract OCR
- Texte existant (Text Exists)
- Info-bulle
- Saisir dans (Type Into)
- Saisir un texte sécurisé (Type Secure Text)
- Utiliser le premier plan
- Attendre un attribut (Wait Attribute)
- Attendre que l'élément disparaisse (Wait Element Vanish)
- Attendre que l'image disparaisse (Wait Image Vanish)
- Vérification de l’accessibilité
- Application event trigger
- Block User Input
- Check/Uncheck
- Check App State
- Check Element
- Cliquer (Click)
- Click Event Trigger
- Glisser et déposer
- Extract Table Data
- Find Elements
- For Each UiElement
- Get Browser Data
- Get Clipboard (Obtenir le Presse-papiers)
- Obtenir le texte (Get Text)
- Get URL
- Go To URL
- Mettre en surbrillance (Highlight)
- Pointer (Hover)
- Inject Js Script
- Raccourcis clavier
- Keypress Event Trigger
- Mouse scroll
- Navigate Browser
- Sélectionner l'élément (Select Item)
- Set Browser Data
- Set Clipboard (Définir le Presse-papiers)
- Définir le navigateur du runtime (Set Runtime Browser)
- Définir le focus (Set Focus)
- Définir le texte (Set Text)
- Prendre une capture d'écran (Take Screenshot)
- Saisir dans (Type Into)
- Unblock User Input
- Use Application/Browser
- Window operation
- Joindre
- Vérifier (Check)
- Cliquer (Click)
- Glisser et déposer
- Extraire des données
- Obtenir l'attribut (Get Attribute)
- ObtenirEnfants
- ObtenirCibleRuntime
- GetText
- Get URL
- GoToUrl
- Mettre en surbrillance (Highlight)
- Pointer (Hover)
- IsEnabled
- Raccourci clavier
- Mouse scroll
- Ouvrir
- Sélectionner l'élément (Select Item)
- Prendre une capture d'écran (Take Screenshot)
- Saisir dans (Type Into)
- ÉtatAttente
- Effectuez une recherche par navigateur et récupérez les résultats à l'aide des API UI Automation
- Navigation sur le Web
- Rechercher des images
- Cliquer sur des images
- Déclencher et surveiller des événements
- Créer et remplacer des fichiers
- Pages HTML : extraire et manipuler des informations
- Manipulation des fenêtres
- Sélection de liste automatisée
- Rechercher et manipuler des éléments de fenêtre
- Gérer l'automatisation du texte
- Charger et traiter des images
- Gérer les actions activées par la souris
- Automatiser l'exécution des applications
- Exécution automatisée d'une application locale
- Navigation avec le navigateur
- Automatisation Web
- Exemple de fonctionnalités du déclencheur
- Activer la prise en charge d’UI Automation dans DevExpress
- Computer Vision Local Server
- Automatisation mobile
- Notes de publication
- À propos de l'architecture d'automatisation des appareils mobiles
- Compatibilité du projet
- Get Log Types
- Get Logs
- Get Page Source
- Get Device Orientation
- Get Session Identifier
- Installer l'application
- Gérer l'application actuelle
- Gérer une autre application
- Ouvrir DeepLink
- Ouvrir l'URL
- Mobile Device Connection
- Balayer directionnel
- Dessiner un modèle
- Positional Swipe
- Press Hardware Button
- Set Device Orientation
- Prendre une capture d'écran (Take Screenshot)
- Prendre une partie de capture d'écran
- Élément existant (Element Exists)
- Execute Command
- Obtenir l'attribut (Get Attribute)
- Get Selected Item
- Obtenir le texte (Get Text)
- Set Selected Item
- Définir le texte (Set Text)
- Balayer
- Tap
- Saisir texte
- Premiers pas avec les API d’automatisation mobile
- Gestion des boîtes de dialogue contextuelles dans les automatisations mobiles
- Creating variables from selector attributes
- Créer des workflows d'automatisation mobile
- Utiliser l’automatisation mobile pour les applications de banque mobile
- Automatisation pour les applications React Native
- Terminal
- Notes de publication
- À propos du package d'activités Terminal
- Compatibilité du projet
- Meilleures pratiques
- Rechercher un texte (Find Text)
- Get Color At Position
- Obtenir la position du curseur (Get Cursor Position)
- Obtenir le champ (Get Field)
- Obtenir le champ en position (Get Field at Position)
- Accéder à la zone d'écran (Get Screen Area)
- Obtenir le texte (Get Text)
- Obtenir le texte en position (Get Text at Position)
- Déplacer le curseur (Move Cursor)
- Move Cursor to Text
- Envoyer la touche Contrôle (Send Control Key)
- Envoyer les touches (Send Keys)
- Envoyer les touches en toute sécurité (Send Keys Secure)
- Définir le champ (Set Field)
- Définir le champ en position (Set Field at Position)
- Session de terminal (Terminal Session)
- Attendre le texte de champ (Wait Field Text)
- Wait Screen Ready
- Attendre le texte d'écran (Wait Screen Text)
- Attendre le texte en position (Wait Text at Position)

Activités UIAutomation
Ouvrir
Ouvre une application de bureau ou une page de navigateur Web à utiliser dans UI Automation.
Cette API est utilisée en appelant le service UiAutomation, selon le format suivant : uiAutomation.API(). Par exemple, uiAutomation.Open().
Définition
Espace de noms : UiPath.UIAutomationNext.API.Contracts
Assembly : UiPath.UIAutomationNext.API.Contracts (dans UiPath.UIAutomationNext.API.Contracts dll)
Surcharges
| Surcharge | Description |
|---|---|
Open(String, TargetAppOptions, String, String) | Ouvre une application de bureau ou une page Web spécifique à utiliser dans UI Automation, identifiée par le nom d'écran du référentiel d'objets. |
Open(TargetAppModel, TargetAppOptions) | Ouvre une application de bureau ou une page Web spécifique à utiliser dans UI Automation, identifiée par l'objet TargetAppModel . |
Open(String, String, String, NAppOpenMode, NWindowResize, NInteractionMode) | Ouvre une application de bureau ou une page Web spécifique à utiliser dans UI Automation, identifiée par le nom d'écran du référentiel d'objets, ainsi que d'autres personnalisations de l'application ou de la page Web. |
Open(String, TargetAppOptions, String, String)
Ouvre une application de bureau ou une page Web spécifique à utiliser dans UI Automation, identifiée par le nom d'écran du référentiel d'objets.
Open(
string screenName,
TargetAppOptions targetAppOptions,
[string appName],
[string appVersion])
Open(
string screenName,
TargetAppOptions targetAppOptions,
[string appName],
[string appVersion])
screeName String : le nom de l'écran sur lequel vous souhaitez vous concentrer, sous la forme d'une String enregistrée dans le Référentiel d'objets.
targetAppOptions : options et paramètres supplémentaires pour se connecter à l'application ou à la page Web :
* `Timeout Double` - Specify a number
of seconds for which to wait for the activity to be executed before
throwing an error. The default value is 30 seconds. When indicating
a window in a Remote Desktop environment, the Timeout default
setting is set to 60 seconds.
* `InteractionMode
NInteractionMode`:
+ `HardwareEvents` - Uses the hardware
driver to perform the action. This is the slowest API, it
cannot work in the background, but it is compatible with all
desktop apps.
+ `Simulate` - Simulates the action using
accessibility APIs. Recommended in browser automation, Java
apps, or SAP. More reliable than Hardware Events. Sends all
text in a single action. Works even if the target
application is not in focus. Please test if your target
application UI element supports this.
+ `DebuggerApi` - Performs actions using
debugger APIs. Works only for Chromium elements. Sends all
text in one go. Works even if target app is not in focus.
For more details, check out this [page](https://docs.uipath.com/studio/docs/chromium-api).
+ `WindowMessages` - Sends the mouse and
keyboard input through Win32 messages. Recommended for
desktop apps. Usually more reliable than Hardware Events.
Sends all text in a single action. Works even if target app
is not in focus. Please test if your target application UI
element supports this.
+ `Background` - Runs actions in the
background. Tries to use either Simulate or Chromium API
where possible, while complex APIs (image, native text)
run as usual, in the foreground. It is highly recommended to
use this API with the [Verify Execution](https://docs.uipath.com/activities/other/latest/user-guide/project-settings-ui-automation)
feature.
* `OpenMode NAppOpenMode` - choose when
to open the app:
+ `Never` (never open the
application)
+ `IfNotOpen` (open only if the
application is closed, this is the default selection, only
works if `FilePath` or `URL`
are provided)
+ `Always` (open another instance of the
application even if one is already open, only works if
`FilePath` or `URL` are
provided)
* `WindowResize NWindowResize` - choose
the size of the window:
+ `None`
+ `Maximize`
+ `Restore`
+ `Minimize`
* `UserDataFolderMode
BrowserUserDataFolderMode` - The
`UserDataFolderMode` you want to set. It is used
to start the browser with a specific user data folder.
+ `Automatic` - Picture In Picture mode
uses a different folder than the default mode, automatically
generated if `UserDataFolderPath` is not
set.
+ `DefaultFolder` - Uses the default
browser folder, no matter if it runs in the main or PIP
session.
+ `CustomFolder` - Uses the folder
specified in `UserDataFolderPath` or an auto
generated path if `UserDataFolderPath` is not
set.
* `UserDataFolderPath String` - The
user data folder that the browser uses. Defaults to
`%LocalAppData%\UiPath\PIP Browser
Profiles\BrowserType` if not set.
* `IsIncognito Boolean` - input
`True` if you want to open the browser in
incognito mode. By default it's set to `False`.
* `WebDriverMode NWebDriverMode` -
Indicates how the WebDriver is used when opening a new browser
session. The following options are available:
+ `Disabled` - Disables the use of
WebDriver.
+ `WithGUI` - The GUI of the browser is
displayed.
+ `Headless` - The browser is launched
silently, with no GUI.
* `Timeout Double` - Specify a number
of seconds for which to wait for the activity to be executed before
throwing an error. The default value is 30 seconds. When indicating
a window in a Remote Desktop environment, the Timeout default
setting is set to 60 seconds.
* `InteractionMode
NInteractionMode`:
+ `HardwareEvents` - Uses the hardware
driver to perform the action. This is the slowest API, it
cannot work in the background, but it is compatible with all
desktop apps.
+ `Simulate` - Simulates the action using
accessibility APIs. Recommended in browser automation, Java
apps, or SAP. More reliable than Hardware Events. Sends all
text in a single action. Works even if the target
application is not in focus. Please test if your target
application UI element supports this.
+ `DebuggerApi` - Performs actions using
debugger APIs. Works only for Chromium elements. Sends all
text in one go. Works even if target app is not in focus.
For more details, check out this [page](https://docs.uipath.com/fr/studio/docs/chromium-api).
+ `WindowMessages` - Sends the mouse and
keyboard input through Win32 messages. Recommended for
desktop apps. Usually more reliable than Hardware Events.
Sends all text in a single action. Works even if target app
is not in focus. Please test if your target application UI
element supports this.
+ `Background` - Runs actions in the
background. Tries to use either Simulate or Chromium API
where possible, while complex APIs (image, native text)
run as usual, in the foreground. It is highly recommended to
use this API with the [Verify Execution](https://docs.uipath.com/fr/activities/other/latest/user-guide/project-settings-ui-automation)
feature.
* `OpenMode NAppOpenMode` - choose when
to open the app:
+ `Never` (never open the
application)
+ `IfNotOpen` (open only if the
application is closed, this is the default selection, only
works if `FilePath` or `URL`
are provided)
+ `Always` (open another instance of the
application even if one is already open, only works if
`FilePath` or `URL` are
provided)
* `WindowResize NWindowResize` - choose
the size of the window:
+ `None`
+ `Maximize`
+ `Restore`
+ `Minimize`
* `UserDataFolderMode
BrowserUserDataFolderMode` - The
`UserDataFolderMode` you want to set. It is used
to start the browser with a specific user data folder.
+ `Automatic` - Picture In Picture mode
uses a different folder than the default mode, automatically
generated if `UserDataFolderPath` is not
set.
+ `DefaultFolder` - Uses the default
browser folder, no matter if it runs in the main or PIP
session.
+ `CustomFolder` - Uses the folder
specified in `UserDataFolderPath` or an auto
generated path if `UserDataFolderPath` is not
set.
* `UserDataFolderPath String` - The
user data folder that the browser uses. Defaults to
`%LocalAppData%\UiPath\PIP Browser
Profiles\BrowserType` if not set.
* `IsIncognito Boolean` - input
`True` if you want to open the browser in
incognito mode. By default it's set to `False`.
* `WebDriverMode NWebDriverMode` -
Indicates how the WebDriver is used when opening a new browser
session. The following options are available:
+ `Disabled` - Disables the use of
WebDriver.
+ `WithGUI` - The GUI of the browser is
displayed.
+ `Headless` - The browser is launched
silently, with no GUI.
appName String : le nom de l'application à laquelle se connecter. Ce paramètre s'applique aux applications de bureau.
appVersion String : la version de l'application à laquelle se connecter. Ce paramètre s'applique aux applications de bureau.
Open(TargetAppModel, TargetAppOptions)
Ouvre une application de bureau ou une page Web spécifique à utiliser dans UI Automation, identifiée par l'objet TargetAppModel .
Open(
TargetAppModel targetApp,
[TargetAppOptions targetAppOptions])
Open(
TargetAppModel targetApp,
[TargetAppOptions targetAppOptions])
targetApp TargetAppModel : l'application cible ou la page Web à laquelle se connecter. C’est un objet de type TargetAppModel qui fournit des informations sur l’application :
* `Selector` - An XML fragment that stores the
attributes of a user interface element.
* `FilePath` - If the application is not a web
browser, specifies the full path of the executable file to
open.
* `Arguments` - If the application is not a web
browser, you can specify parameters to pass to the target
application at startup.
* `Url`
- If the application is a web browser, specifies the URL of the web
page to open.
* `Title` - The title of the application or
browser.
* `Selector` - An XML fragment that stores the
attributes of a user interface element.
* `FilePath` - If the application is not a web
browser, specifies the full path of the executable file to
open.
* `Arguments` - If the application is not a web
browser, you can specify parameters to pass to the target
application at startup.
* `Url`
- If the application is a web browser, specifies the URL of the web
page to open.
* `Title` - The title of the application or
browser.
targetAppOptions : options et paramètres supplémentaires pour se connecter à l'application ou à la page Web :
* `Timeout Double` - Specify a number of seconds
for which to wait for the activity to be executed before throwing an
error. The default value is 30 seconds. When indicating a window in
a Remote Desktop environment, the Timeout default setting is set to
60 seconds.
* `InteractionMode NInteractionMode`:
+ `HardwareEvents` - Uses the hardware driver
to perform the action. This is the slowest API, it cannot
work in the background, but it is compatible with all
desktop apps.
+ `Simulate` - Simulates the action using
accessibility APIs. Recommended in browser automation, Java
apps, or SAP. More reliable than Hardware Events. Sends all
text in a single action. Works even if the target
application is not in focus. Please test if your target
application UI element supports this.
+ `DebuggerApi` - Performs actions using
debugger APIs. Works only for Chromium elements. Sends all
text in one go. Works even if target app is not in focus.
For more details, check out this [page](https://docs.uipath.com/studio/docs/chromium-api).
+ `WindowMessages` - Sends the mouse and
keyboard input through Win32 messages. Recommended for
desktop apps. Usually more reliable than Hardware Events.
Sends all text in a single action. Works even if target app
is not in focus. Please test if your target application UI
element supports this.
+ `Background` - Runs actions in the
background. Tries to use either Simulate or Chromium API
where possible, while complex APIs (image, native text)
run as usual, in the foreground. It is highly recommended to
use this API with the [Verify Execution](https://docs.uipath.com/activities/other/latest/user-guide/project-settings-ui-automation)
feature.
* `OpenMode NAppOpenMode` - choose when to open
the app:
+ `Never` (never open the application)
+ `IfNotOpen` (open only if the application is
closed, this is the default selection, only works if
`FilePath` or `URL` are
provided)
+ `Always` (open another instance of the
application even if one is already open, only works if
`FilePath` or `URL` are
provided)
* `WindowResize NWindowResize` - choose the size
of the window:
+ `None`
+ `Maximize`
+ `Restore`
+ `Minimize`
* `UserDataFolderMode BrowserUserDataFolderMode`
- The `UserDataFolderMode` you want to set. It is
used to start the browser with a specific user data folder.
+ `Automatic` - Picture In Picture mode uses a
different folder than the default mode, automatically
generated if `UserDataFolderPath` is not
set.
+ `DefaultFolder` - Uses the default browser
folder, no matter if it runs in the main or PIP
session.
+ `CustomFolder` - Uses the folder specified in
`UserDataFolderPath` or an auto generated
path if `UserDataFolderPath` is not set.
* `UserDataFolderPath String` - The user data
folder that the browser uses. Defaults to
`%LocalAppData%\UiPath\PIP Browser
Profiles\BrowserType` if not set.
* `IsIncognito Boolean` - input
`True` if you want to open the browser in
incognito mode. By default it's set to `False`.
* `WebDriverMode NWebDriverMode` - Indicates how
the WebDriver is used when opening a new browser session. The
following options are available:
+ `Disabled` - Disables the use of
WebDriver.
+ `WithGUI` - The GUI of the browser is
displayed.
+ `Headless` - The browser is launched
silently, with no GUI.
* `Timeout Double` - Specify a number of seconds
for which to wait for the activity to be executed before throwing an
error. The default value is 30 seconds. When indicating a window in
a Remote Desktop environment, the Timeout default setting is set to
60 seconds.
* `InteractionMode NInteractionMode`:
+ `HardwareEvents` - Uses the hardware driver
to perform the action. This is the slowest API, it cannot
work in the background, but it is compatible with all
desktop apps.
+ `Simulate` - Simulates the action using
accessibility APIs. Recommended in browser automation, Java
apps, or SAP. More reliable than Hardware Events. Sends all
text in a single action. Works even if the target
application is not in focus. Please test if your target
application UI element supports this.
+ `DebuggerApi` - Performs actions using
debugger APIs. Works only for Chromium elements. Sends all
text in one go. Works even if target app is not in focus.
For more details, check out this [page](https://docs.uipath.com/fr/studio/docs/chromium-api).
+ `WindowMessages` - Sends the mouse and
keyboard input through Win32 messages. Recommended for
desktop apps. Usually more reliable than Hardware Events.
Sends all text in a single action. Works even if target app
is not in focus. Please test if your target application UI
element supports this.
+ `Background` - Runs actions in the
background. Tries to use either Simulate or Chromium API
where possible, while complex APIs (image, native text)
run as usual, in the foreground. It is highly recommended to
use this API with the [Verify Execution](https://docs.uipath.com/fr/activities/other/latest/user-guide/project-settings-ui-automation)
feature.
* `OpenMode NAppOpenMode` - choose when to open
the app:
+ `Never` (never open the application)
+ `IfNotOpen` (open only if the application is
closed, this is the default selection, only works if
`FilePath` or `URL` are
provided)
+ `Always` (open another instance of the
application even if one is already open, only works if
`FilePath` or `URL` are
provided)
* `WindowResize NWindowResize` - choose the size
of the window:
+ `None`
+ `Maximize`
+ `Restore`
+ `Minimize`
* `UserDataFolderMode BrowserUserDataFolderMode`
- The `UserDataFolderMode` you want to set. It is
used to start the browser with a specific user data folder.
+ `Automatic` - Picture In Picture mode uses a
different folder than the default mode, automatically
generated if `UserDataFolderPath` is not
set.
+ `DefaultFolder` - Uses the default browser
folder, no matter if it runs in the main or PIP
session.
+ `CustomFolder` - Uses the folder specified in
`UserDataFolderPath` or an auto generated
path if `UserDataFolderPath` is not set.
* `UserDataFolderPath String` - The user data
folder that the browser uses. Defaults to
`%LocalAppData%\UiPath\PIP Browser
Profiles\BrowserType` if not set.
* `IsIncognito Boolean` - input
`True` if you want to open the browser in
incognito mode. By default it's set to `False`.
* `WebDriverMode NWebDriverMode` - Indicates how
the WebDriver is used when opening a new browser session. The
following options are available:
+ `Disabled` - Disables the use of
WebDriver.
+ `WithGUI` - The GUI of the browser is
displayed.
+ `Headless` - The browser is launched
silently, with no GUI.
Open(String, String, String, NAppOpenMode, NWindowResize, NInteractionMode)
Ouvre une application de bureau ou une page Web spécifique à utiliser dans UI Automation, identifiée par le nom d'écran du référentiel d'objets, ainsi que d'autres personnalisations de l'application ou de la page Web.
Open(
string screenName,
[string appName],
[string appVersion],
[NAppOpenMode openMode],
[NWindowResize windowResize],
[NInteractionMode interactionMode])
Open(
string screenName,
[string appName],
[string appVersion],
[NAppOpenMode openMode],
[NWindowResize windowResize],
[NInteractionMode interactionMode])
screeName String : le nom de l'écran sur lequel vous souhaitez vous concentrer, sous la forme d'une String enregistrée dans le Référentiel d'objets.
appName String : le nom de l'application à laquelle se connecter. Ce paramètre s'applique aux applications de bureau.
appVersion String : la version de l'application à laquelle se connecter. Ce paramètre s'applique aux applications de bureau.
openMode NAppOpenMode : sélectionnez quand ouvrir l'application cible pour l'exécution de l'automatisation :
* `Never` (never open the application)
* `IfNotOpen` (open only if the application is closed,
this is the default selection, only works if the
`Url` parameter is configured)
* `Always` - (open another instance of the application
even if one is already open, only works if the `Url`
parameter is configured).
* `Never` (never open the application)
* `IfNotOpen` (open only if the application is closed,
this is the default selection, only works if the
`Url` parameter is configured)
* `Always` - (open another instance of the application
even if one is already open, only works if the `Url`
parameter is configured).
NWindowResize : Choisissez la taille de la fenêtre :
* `None`
* `Maximize`
* `Restore`
* `Minimize`
* `None`
* `Maximize`
* `Restore`
* `Minimize`
NInteractionMode : Choisissez l’API que le Robot doit utiliser pour interagir avec l’application cible :
* `HardwareEvents` - Uses the hardware driver to
perform the action. This is the slowest API, it cannot work in
the background, but it is compatible with all desktop apps.
* `Simulate` - Simulates the action using accessibility
APIs. Recommended in browser automation, Java apps, or SAP. More
reliable than Hardware Events. Sends all text in a single action.
Works even if the target application is not in focus. Please test if
your target application UI element supports this.
* `DebuggerApi` - Performs actions using debugger APIs.
Works only for Chromium elements. Sends all text in one go. Works
even if target app is not in focus. For more details, check out this
[page](https://docs.uipath.com/studio/docs/chromium-api).
* `WindowMessages` - Sends the mouse and keyboard input
through Win32 messages. Recommended for desktop apps. Usually more
reliable than Hardware Events. Sends all text in a single action.
Works even if target app is not in focus. Please test if your target
application UI element supports this.
* `Background` - Runs actions in the background. Tries
to use either Simulate or Chromium API where possible, while complex
APIs (image, native text) run as usual, in the foreground. It is
highly recommended to use this API with the [Verify Execution](https://docs.uipath.com/activities/other/latest/user-guide/project-settings-ui-automation)
feature.
* `HardwareEvents` - Uses the hardware driver to
perform the action. This is the slowest API, it cannot work in
the background, but it is compatible with all desktop apps.
* `Simulate` - Simulates the action using accessibility
APIs. Recommended in browser automation, Java apps, or SAP. More
reliable than Hardware Events. Sends all text in a single action.
Works even if the target application is not in focus. Please test if
your target application UI element supports this.
* `DebuggerApi` - Performs actions using debugger APIs.
Works only for Chromium elements. Sends all text in one go. Works
even if target app is not in focus. For more details, check out this
[page](https://docs.uipath.com/fr/studio/docs/chromium-api).
* `WindowMessages` - Sends the mouse and keyboard input
through Win32 messages. Recommended for desktop apps. Usually more
reliable than Hardware Events. Sends all text in a single action.
Works even if target app is not in focus. Please test if your target
application UI element supports this.
* `Background` - Runs actions in the background. Tries
to use either Simulate or Chromium API where possible, while complex
APIs (image, native text) run as usual, in the foreground. It is
highly recommended to use this API with the [Verify Execution](https://docs.uipath.com/fr/activities/other/latest/user-guide/project-settings-ui-automation)
feature.
Exécution de WebDriverMode sans affichage
Pour utiliser WebDriverMode dans une configuration sans affichage, ces étapes peuvent servir de guide.
Commencez par définir une variable pour votre écran. Utilisez la fonction uiAutomation.Open pour ouvrir une nouvelle application dans le navigateur de votre choix (Edge dans cette instance). Puis, utilisez la classe Options dans la surcharge pour spécifier certaines options de navigateur. Parmi ces options, définissez webDriverMode sur NWebDriverMode.Headless.
Le code correspondant ressemble à ce qui suit :
var screen = uiAutomation.Open(Descriptors.NewApplication.Edge, Options.AppOpen().WithBrowserOptions(webDriverMode: NWebDriverMode.Headless));
var screen = uiAutomation.Open(Descriptors.NewApplication.Edge, Options.AppOpen().WithBrowserOptions(webDriverMode: NWebDriverMode.Headless));
Ce code définit WebDriver en mode sans affichage, permettant l’automatisation du navigateur sans que le navigateur soit visiblement ouvert.