UiPath Documentation
activities
latest
false
Atividades do UIAutomation
Importante :
A tradução automática foi aplicada parcialmente neste conteúdo. A localização de um conteúdo recém-publicado pode levar de 1 a 2 semanas para ficar disponível.

Click

Clica em um elemento de IU especificado, por exemplo, um botão ou link. Pode ser configurado para usar qualquer botão do mouse, use um duplo clique.

Essa API deve ser adicionada após Abrir ou Anexar.

Definição

Namespace: UiPath.UIAutomationNext.API.Models

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

Sobrecarregas

SobrecargaDescription
Click(String, ClickOptions)Clica em um elemento de interface gráfica identificado por uma cadeia de caracteres no Repositório de Objetos.
Click(IElementDescriptor, ClickOptions)Clica em um elemento de interface gráfica identificado por um descritor de um elemento do Repositório de Objetos.
Click(TargetAnchorableModel, ClickOptions)Clica em um modelo ancorado de destino, que representa um elemento de interface gráfica específico no aplicativo.
Click(RuntimeTarget, ClickOptions)Clica em um elemento de interface gráfica identificado por uma instância de runtime de um elemento do Repositório de Objetos.
Click(String, NClickType, NMouseButton)Executa uma operação de clique em um elemento de interface gráfica identificado por uma string no Repositório de Objetos, especificando o tipo de clique e o botão do mouse.
Click(IElementDescriptor, NClickType, NMouseButton)Clica em um elemento de Interface Gráfica identificado por um descritor de um elemento do Repositório de Objetos, especificando o tipo de clique e o botão do mouse.

Click(String, ClickOptions)

Clica em um elemento de interface gráfica identificado pela sua representação de string.

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

target String : indique o elemento de interface gráfica capturado no Repositório de objetos no qual você deseja clicar.

clickOptions ClickOptions : opções adicionais para personalizar a operação de clique:

* `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/pt-BR/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)

Clica em um elemento de interface gráfica identificado por um descritor de um elemento do Repositório de Objetos.

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

elementDescriptor IElementDescriptor : o elemento de interface gráfica no qual você deseja clicar, identificado por um descritor de um elemento do Repositório de objetos.

clickOptions ClickOptions : opções adicionais para personalizar a operação de clique:

* `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/pt-BR/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)

Clica em um modelo ancorado de destino, que representa um elemento de interface gráfica específico no aplicativo.

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

target TargetAnchorableModel : o modelo ancoável de destino (elemento de interface gráfica) no qual você deseja clicar.

clickOptions ClickOptions : opções adicionais para personalizar a operação de clique:

* `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/pt-BR/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)

Clica em um elemento de interface gráfica identificado por uma instância de runtime de um elemento do Repositório de Objetos.

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

target RuntimeTarget : o elemento de interface gráfica no qual você deseja clicar, identificado por uma instância de runtime de um elemento do Repositório de objetos.

clickOptions ClickOptions : opções adicionais para personalizar a operação de clique:

* `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/pt-BR/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)

Executar uma operação de clique em um elemento de interface gráfica identificado pela representação de string ou seletor, especificando o tipo de clique e o botão do mouse.

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

target String : indique o elemento de interface gráfica capturado no Repositório de objetos no qual você deseja clicar.

clickType NClickType : o tipo de clique a ser executado: Único, Duplo, Pressionado ou Ao soltar. A opção padrão é Único. : por exemplo, para realizar um clique duplo, você só precisa definir o tipo de clique como NClickType.Double:clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest, new ClickOptions(){ClickType = NClickType.Double}.WithVariable("account_number_system1", "407547"));.

mouseButton NMouseButton : o botão do mouse para clicar com: Esquerda, Meio ou Direita. A opção padrão é Esquerda.

Click(IElementDescriptor, NClickType, NMouseButton)

Clica em um elemento de Interface Gráfica identificado por um descritor de um elemento do Repositório de Objetos, especificando o tipo de clique e o botão do mouse.

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

elementDescriptor IElementDescriptor : o elemento de interface gráfica no qual você deseja clicar, identificado por um descritor de um elemento do Repositório de objetos.

clickType NClickType : o tipo de clique a ser executado: Único, Duplo, Pressionado ou Ao soltar. A opção padrão é Único. : por exemplo, para realizar um clique duplo, você só precisa definir o tipo de clique como NClickType.Double:clientAccountsScreen.Click(Descriptors.ACME_System_3.ClientAccountsScreen.AccountRowTest, new ClickOptions(){ClickType = NClickType.Double}.WithVariable("account_number_system1", "407547"));.

mouseButton NMouseButton : o botão do mouse para clicar com: Esquerda, Meio ou Direita. A opção padrão é Esquerda.

Esta página foi útil?

Conectar

Precisa de ajuda? Suporte

Quer aprender? Academia UiPath

Tem perguntas? Fórum do UiPath

Fique por dentro das novidades