UiPath Documentation
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 16 avr. 2026

Cliquer (Click)

Clique sur un élément d’IU spécifié, par exemple un bouton ou un lien. Peut être configuré pour utiliser n’importe quel bouton de la souris, utilisez un double-clic.

Cette API doit être ajoutée après Ouvrir ou Joindre.

Définition

Espace de noms: UiPath.UIAutomationNext.API.Models

Assembly: UiPath.UIAutomationNext.API.Models (dans UiPath.UIAutomationNext.API.Models dll)

Surcharges

SurchargeDescription
Click(String, ClickOptions)Clique sur un élément d'IU identifié par une chaîne dans le référentiel d'objets.
Click(IElementDescriptor, ClickOptions)Clique sur un élément d’IU identifié par un descripteur d’un élément du référentiel d’objets.
Click(TargetAnchorableModel, ClickOptions)Clique sur un modèle ancré cible, qui représente un élément d'IU spécifique dans l'application.
Click(RuntimeTarget, ClickOptions)Clique sur un élément d’IU identifié par une instance de runtime d’un élément de référentiel d’objets.
Click(String, NClickType, NMouseButton)Effectue une opération de clic sur un élément d'IU identifié par une chaîne dans le référentiel d'objets, en spécifiant le type de clic et le bouton de la souris.
Click(IElementDescriptor, NClickType, NMouseButton)Clique sur un élément d'IU identifié par un descripteur d'un élément du référentiel d'objets, en spécifiant le type de clic et le bouton de la souris.

Click(String, ClickOptions)

Clique sur un élément d'IU identifié par sa représentation sous forme de chaîne.

Click(
    TargetAnchorableModel target, 
    ClickOptions clickOptions)
Click(
    TargetAnchorableModel target, 
    ClickOptions clickOptions)

target String : indiquez l'élément d'IU capturé dans le référentiel d'objets sur lequel vous souhaitez cliquer.

clickOptions ClickOptions : options supplémentaires pour personnaliser l'opération de clic :

* `KeyModifiers NKeyModifiers`:
  + `None`
  + `Alt`
  + `Ctrl`
  + `Shift`
  + `Win`
* `ClickType NClickType`:
  + `Single`
  + `Double`
  + `Down`
  + `Up`

  For example, to perform a double click you just need to set
  the click type to
  `NClickType.Double`:

  `clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest,
  new ClickOptions(){ClickType =
  NClickType.Double}.WithVariable("account_number_system1",
  "407547"));`.
* `MouseButton NMouseButton`:
  + `Left`
  + `Right`
  + `Middle`
* `CursorMotionType
  CursorMotionType`:
  + `Instant` - The cursor jumps to the
    destination.
  + `Smooth` - The cursor moves in
    increments.
* `InteractionMode
  NInteractionMode`:
  + `HardwareEvents` - Simulates the click
    by using the hardware driver. This is the slowest API, it
    cannot work in the background, but it is compatible with all
    desktop apps.
  + `SameAsCard` - Use the same input mode
    as the Open or Attach APIs. This is the default
    selection.
  + `Simulate` - Simulates the click using
    accessibility APIs. Recommended in browser automation, Java
    apps, or SAP. More reliable than Hardware Events. 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 for Chromium elements only. Sends all
    text in one go. Works even if the target application is not
    in focus. For more details, check out this [page](https://docs.uipath.com/studio/standalone/2023.10/user-guide/chromium-api).
  + `WindowMessages` - Simulates using Win32
    messages. Recommended for desktop apps. Usually more
    reliable than Hardware Events. Sends all text in one go.
    Works even if the target application is not in focus. Before
    using this API, please test if your target application UI
    element supports this.
* `KeyModifiers NKeyModifiers`:
  + `None`
  + `Alt`
  + `Ctrl`
  + `Shift`
  + `Win`
* `ClickType NClickType`:
  + `Single`
  + `Double`
  + `Down`
  + `Up`

  For example, to perform a double click you just need to set
  the click type to
  `NClickType.Double`:

  `clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest,
  new ClickOptions(){ClickType =
  NClickType.Double}.WithVariable("account_number_system1",
  "407547"));`.
* `MouseButton NMouseButton`:
  + `Left`
  + `Right`
  + `Middle`
* `CursorMotionType
  CursorMotionType`:
  + `Instant` - The cursor jumps to the
    destination.
  + `Smooth` - The cursor moves in
    increments.
* `InteractionMode
  NInteractionMode`:
  + `HardwareEvents` - Simulates the click
    by using the hardware driver. This is the slowest API, it
    cannot work in the background, but it is compatible with all
    desktop apps.
  + `SameAsCard` - Use the same input mode
    as the Open or Attach APIs. This is the default
    selection.
  + `Simulate` - Simulates the click using
    accessibility APIs. Recommended in browser automation, Java
    apps, or SAP. More reliable than Hardware Events. 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 for Chromium elements only. Sends all
    text in one go. Works even if the target application is not
    in focus. For more details, check out this [page](https://docs.uipath.com/fr/studio/standalone/2023.10/user-guide/chromium-api).
  + `WindowMessages` - Simulates using Win32
    messages. Recommended for desktop apps. Usually more
    reliable than Hardware Events. Sends all text in one go.
    Works even if the target application is not in focus. Before
    using this API, please test if your target application UI
    element supports this.

Click(IElementDescriptor, ClickOptions)

Clique sur un élément d’IU identifié par un descripteur d’un élément du référentiel d’objets.

Click(
    IElementDescriptor elementDescriptor,
    ClickOptions clickOptions)
Click(
    IElementDescriptor elementDescriptor,
    ClickOptions clickOptions)

elementDescriptor IElementDescriptor : l’élément d’IU sur lequel vous voulez cliquer, identifié par un descripteur d’un élément du référentiel d’objets.

clickOptions ClickOptions : options supplémentaires pour personnaliser l'opération de clic :

* `KeyModifiers NKeyModifiers`:
  + `None`
  + `Alt`
  + `Ctrl`
  + `Shift`
  + `Win`
* `ClickType
  NClickType`:
  + `Single`
  + `Double`
  + `Down`
  + `Up`

  For example, to perform a double click you just need to set
  the click type to
  `NClickType.Double`:

  `clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest,
  new ClickOptions(){ClickType =
  NClickType.Double}.WithVariable("account_number_system1",
  "407547"));`.
* `MouseButton NMouseButton`:
  + `Left`
  + `Right`
  + `Middle`
* `CursorMotionType
  CursorMotionType`:
  + `Instant` - The cursor jumps to the
    destination.
  + `Smooth` - The cursor moves in
    increments.
* `InteractionMode
  NInteractionMode`:
  + `HardwareEvents` - Simulates the click
    by using the hardware driver. This is the slowest API, it
    cannot work in the background, but it is compatible with all
    desktop apps.
  + `SameAsCard` - Use the same input mode
    as the Open or Attach APIs. This is the default
    selection.
  + `Simulate` - Simulates the click using
    accessibility APIs. Recommended in browser automation, Java
    apps, or SAP. More reliable than Hardware Events. 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 for Chromium elements only. Sends all
    text in one go. Works even if the target application is not
    in focus. For more details, check out this [page](https://docs.uipath.com/studio/standalone/2023.10/user-guide/chromium-api).
  + `WindowMessages` - Simulates using Win32
    messages. Recommended for desktop apps. Usually more
    reliable than Hardware Events. Sends all text in one go.
    Works even if the target application is not in focus. Before
    using this API, please test if your target application UI
    element supports this.
* `KeyModifiers NKeyModifiers`:
  + `None`
  + `Alt`
  + `Ctrl`
  + `Shift`
  + `Win`
* `ClickType
  NClickType`:
  + `Single`
  + `Double`
  + `Down`
  + `Up`

  For example, to perform a double click you just need to set
  the click type to
  `NClickType.Double`:

  `clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest,
  new ClickOptions(){ClickType =
  NClickType.Double}.WithVariable("account_number_system1",
  "407547"));`.
* `MouseButton NMouseButton`:
  + `Left`
  + `Right`
  + `Middle`
* `CursorMotionType
  CursorMotionType`:
  + `Instant` - The cursor jumps to the
    destination.
  + `Smooth` - The cursor moves in
    increments.
* `InteractionMode
  NInteractionMode`:
  + `HardwareEvents` - Simulates the click
    by using the hardware driver. This is the slowest API, it
    cannot work in the background, but it is compatible with all
    desktop apps.
  + `SameAsCard` - Use the same input mode
    as the Open or Attach APIs. This is the default
    selection.
  + `Simulate` - Simulates the click using
    accessibility APIs. Recommended in browser automation, Java
    apps, or SAP. More reliable than Hardware Events. 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 for Chromium elements only. Sends all
    text in one go. Works even if the target application is not
    in focus. For more details, check out this [page](https://docs.uipath.com/fr/studio/standalone/2023.10/user-guide/chromium-api).
  + `WindowMessages` - Simulates using Win32
    messages. Recommended for desktop apps. Usually more
    reliable than Hardware Events. Sends all text in one go.
    Works even if the target application is not in focus. Before
    using this API, please test if your target application UI
    element supports this.

Click(TargetAnchorableModel, ClickOptions)

Clique sur un modèle ancré cible, qui représente un élément d'IU spécifique dans l'application.

Click(
    TargetAnchorableModel target, 
    ClickOptions clickOptions)
Click(
    TargetAnchorableModel target, 
    ClickOptions clickOptions)

target TargetAnchorableModel : le modèle ancré cible (élément d'IU) sur lequel vous souhaitez cliquer.

clickOptions ClickOptions : options supplémentaires pour personnaliser l'opération de clic :

* `KeyModifiers NKeyModifiers`:
  + `None`
  + `Alt`
  + `Ctrl`
  + `Shift`
  + `Win`
* `ClickType NClickType`:
  + `Single`
  + `Double`
  + `Down`
  + `Up`

  For example, to perform a double click you just need to set
  the click type to
  `NClickType.Double`:

  `clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest,
  new ClickOptions(){ClickType =
  NClickType.Double}.WithVariable("account_number_system1",
  "407547"));`.
* `MouseButton NMouseButton`:
  + `Left`
  + `Right`
  + `Middle`
* `CursorMotionType CursorMotionType`:
  + `Instant` - The cursor jumps to the
    destination.
  + `Smooth` - The cursor moves in
    increments.
* `InteractionMode NInteractionMode`:
  + `HardwareEvents` - Simulates the click by
    using the hardware driver. This is the slowest API, it
    cannot work in the background, but it is compatible with all
    desktop apps.
  + `SameAsCard` - Use the same input mode as the
    Open or Attach APIs. This is the default selection.
  + `Simulate` - Simulates the click using
    accessibility APIs. Recommended in browser automation, Java
    apps, or SAP. More reliable than Hardware Events. 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 for Chromium elements only. Sends all
    text in one go. Works even if the target application is not
    in focus. For more details, check out this [page](https://docs.uipath.com/studio/standalone/2023.10/user-guide/chromium-api).
  + `WindowMessages` - Simulates using Win32
    messages. Recommended for desktop apps. Usually more
    reliable than Hardware Events. Sends all text in one go.
    Works even if the target application is not in focus. Before
    using this API, please test if your target application UI
    element supports this.
* `KeyModifiers NKeyModifiers`:
  + `None`
  + `Alt`
  + `Ctrl`
  + `Shift`
  + `Win`
* `ClickType NClickType`:
  + `Single`
  + `Double`
  + `Down`
  + `Up`

  For example, to perform a double click you just need to set
  the click type to
  `NClickType.Double`:

  `clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest,
  new ClickOptions(){ClickType =
  NClickType.Double}.WithVariable("account_number_system1",
  "407547"));`.
* `MouseButton NMouseButton`:
  + `Left`
  + `Right`
  + `Middle`
* `CursorMotionType CursorMotionType`:
  + `Instant` - The cursor jumps to the
    destination.
  + `Smooth` - The cursor moves in
    increments.
* `InteractionMode NInteractionMode`:
  + `HardwareEvents` - Simulates the click by
    using the hardware driver. This is the slowest API, it
    cannot work in the background, but it is compatible with all
    desktop apps.
  + `SameAsCard` - Use the same input mode as the
    Open or Attach APIs. This is the default selection.
  + `Simulate` - Simulates the click using
    accessibility APIs. Recommended in browser automation, Java
    apps, or SAP. More reliable than Hardware Events. 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 for Chromium elements only. Sends all
    text in one go. Works even if the target application is not
    in focus. For more details, check out this [page](https://docs.uipath.com/fr/studio/standalone/2023.10/user-guide/chromium-api).
  + `WindowMessages` - Simulates using Win32
    messages. Recommended for desktop apps. Usually more
    reliable than Hardware Events. Sends all text in one go.
    Works even if the target application is not in focus. Before
    using this API, please test if your target application UI
    element supports this.

Click(RuntimeTarget, ClickOptions)

Clique sur un élément d’IU identifié par une instance de runtime d’un élément de référentiel d’objets.

Click(
    RuntimeTarget target,
    ClickOptions clickOptions)
Click(
    RuntimeTarget target,
    ClickOptions clickOptions)

target RuntimeTarget : l’élément d’IU sur lequel vous voulez cliquer, identifié par une instance de runtime d’un élément du référentiel d’objets.

clickOptions ClickOptions : options supplémentaires pour personnaliser l'opération de clic :

* `KeyModifiers NKeyModifiers`:
  + `None`
  + `Alt`
  + `Ctrl`
  + `Shift`
  + `Win`
* `ClickType
  NClickType`:
  + `Single`
  + `Double`
  + `Down`
  + `Up`

  For example, to perform a double click you just need to set
  the click type to
  `NClickType.Double`:

  `clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest,
  new ClickOptions(){ClickType =
  NClickType.Double}.WithVariable("account_number_system1",
  "407547"));`.
* `MouseButton NMouseButton`:
  + `Left`
  + `Right`
  + `Middle`
* `CursorMotionType
  CursorMotionType`:
  + `Instant` - The cursor jumps to the
    destination.
  + `Smooth` - The cursor moves in
    increments.
* `InteractionMode
  NInteractionMode`:
  + `HardwareEvents` - Simulates the click
    by using the hardware driver. This is the slowest API, it
    cannot work in the background, but it is compatible with all
    desktop apps.
  + `SameAsCard` - Use the same input mode
    as the Open or Attach APIs. This is the default
    selection.
  + `Simulate` - Simulates the click using
    accessibility APIs. Recommended in browser automation, Java
    apps, or SAP. More reliable than Hardware Events. 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 for Chromium elements only. Sends all
    text in one go. Works even if the target application is not
    in focus. For more details, check out this [page](https://docs.uipath.com/studio/standalone/2023.10/user-guide/chromium-api).
  + `WindowMessages` - Simulates using Win32
    messages. Recommended for desktop apps. Usually more
    reliable than Hardware Events. Sends all text in one go.
    Works even if the target application is not in focus. Before
    using this API, please test if your target application UI
    element supports this.
* `KeyModifiers NKeyModifiers`:
  + `None`
  + `Alt`
  + `Ctrl`
  + `Shift`
  + `Win`
* `ClickType
  NClickType`:
  + `Single`
  + `Double`
  + `Down`
  + `Up`

  For example, to perform a double click you just need to set
  the click type to
  `NClickType.Double`:

  `clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest,
  new ClickOptions(){ClickType =
  NClickType.Double}.WithVariable("account_number_system1",
  "407547"));`.
* `MouseButton NMouseButton`:
  + `Left`
  + `Right`
  + `Middle`
* `CursorMotionType
  CursorMotionType`:
  + `Instant` - The cursor jumps to the
    destination.
  + `Smooth` - The cursor moves in
    increments.
* `InteractionMode
  NInteractionMode`:
  + `HardwareEvents` - Simulates the click
    by using the hardware driver. This is the slowest API, it
    cannot work in the background, but it is compatible with all
    desktop apps.
  + `SameAsCard` - Use the same input mode
    as the Open or Attach APIs. This is the default
    selection.
  + `Simulate` - Simulates the click using
    accessibility APIs. Recommended in browser automation, Java
    apps, or SAP. More reliable than Hardware Events. 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 for Chromium elements only. Sends all
    text in one go. Works even if the target application is not
    in focus. For more details, check out this [page](https://docs.uipath.com/fr/studio/standalone/2023.10/user-guide/chromium-api).
  + `WindowMessages` - Simulates using Win32
    messages. Recommended for desktop apps. Usually more
    reliable than Hardware Events. Sends all text in one go.
    Works even if the target application is not in focus. Before
    using this API, please test if your target application UI
    element supports this.

Click(String, NClickType, NMouseButton)

Effectue une opération de clic sur un élément d'IU identifié par sa représentation de chaîne ou son sélecteur, en spécifiant le type de clic et le bouton de la souris.

Click(
    string target, 
    NClickType clickType, 
    NMouseButton mouseButton)
Click(
    string target, 
    NClickType clickType, 
    NMouseButton mouseButton)

target String : indiquez l'élément d'IU capturé dans le référentiel d'objets sur lequel vous souhaitez cliquer.

clickType NClickType : le type de clic à effectuer : Simple, Double, Bas, ou Haut. L’option par défaut est Simple. : Par exemple, pour effectuer un double-clic, il vous suffit de définir le type de clic sur NClickType.Double:clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest, new ClickOptions(){ClickType = NClickType.Double}.WithVariable("account_number_system1", "407547"));.

mouseButton NMouseButton : le bouton de la souris avec lequel cliquer : Gauche, Milieu ou Droite. L'option par défaut est Gauche.

Click(IElementDescriptor, NClickType, NMouseButton)

Clique sur un élément d'IU identifié par un descripteur d'un élément du référentiel d'objets, en spécifiant le type de clic et le bouton de la souris.

Click(
    IElementDescriptor elementDescriptor,
    NClickType clickType, 
    NMouseButton mouseButton)
Click(
    IElementDescriptor elementDescriptor,
    NClickType clickType, 
    NMouseButton mouseButton)

elementDescriptor IElementDescriptor : l’élément d’IU sur lequel vous voulez cliquer, identifié par un descripteur d’un élément du référentiel d’objets.

clickType NClickType : le type de clic à effectuer : Simple, Double, Bas, ou Haut. L’option par défaut est Simple. : Par exemple, pour effectuer un double-clic, il vous suffit de définir le type de clic sur NClickType.Double:clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest, new ClickOptions(){ClickType = NClickType.Double}.WithVariable("account_number_system1", "407547"));.

mouseButton NMouseButton : le bouton de la souris avec lequel cliquer : Gauche, Milieu ou Droite. L'option par défaut est Gauche.

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