UiPath Documentation
activities
latest
false
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.

Atividades do UIAutomation

Drag and Drop

Executa uma operação de arrastar e soltar do elemento de interface gráfica de origem para o de destino.

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
DragAndDrop(IElementDescriptor, DragAndDropOptions)Arrasta e solta um elemento de interface gráfica especificado, identificado por um descritor de um elemento do Repositório de Objetos, ao personalizar a ação de arrastar e soltar.
DragAndDrop(String, DragAndDropOptions)Arrasta e solta um elemento de interface gráfica especificado, identificado por uma string do Repositório de Objetos, ao personalizar a ação de arrastar e soltar.
DragAndDrop(IElementDescriptor, TargetAnchorableModel, NKeyModifiers, NMouseButton, CursorMotionType, Boolean, Double)Arrasta e solta um elemento de IU especificado, identificado por um descritor de um elemento do Repositório de Objetos e pelo objeto TargetAnchorableModel , enquanto especifica os modificadores de teclas, o botão do mouse e o tipo de movimento do cursor que você deseja usar.
DragAndDrop(String, TargetAnchorableModel, NKeyModifiers, NMouseButton, CursorMotionType, Boolean, Double)Arrasta e solta um elemento de Interface Gráfica especificado, identificado por uma string do Repositório de Objetos e pelo objeto TargetAnchorableModel , enquanto especifica os modificadores de teclas, o botão do mouse e o tipo de movimento do cursor que você deseja usar.
DragAndDrop(TargetAnchorableModel, DragAndDropOptions)Arrasta e solta um elemento de interface gráfica especificado, identificado pelo objeto TargetAnchorableModel , enquanto personaliza a ação de arrastar e soltar.
DragAndDrop(RuntimeTarget, DragAndDropOptions)Arrasta e solta um elemento de interface gráfica especificado, identificado por uma instância de runtime de um elemento do Repositório de Objetos, enquanto personaliza a ação de arrastar e soltar.

DragAndDrop(IElementDescriptor, DragAndDropOptions)

Arrasta e solta um elemento de interface gráfica especificado, identificado por um descritor de um elemento de interface gráfica do Repositório de Objetos, ao personalizar a ação de arrastar e soltar.

DragAndDrop(
    IElementDescriptor elementDescriptor,
    DragAndDropOptions dragAndDropOptions)
DragAndDrop(
    IElementDescriptor elementDescriptor,
    DragAndDropOptions dragAndDropOptions)

elementDescriptor IElementDescriptor : o elemento de interface gráfica que você deseja arrastar e soltar, identificado por um descritor de um elemento de interface gráfica do Repositório de objetos.

dragAndDropOptions DragAndDropOptions : opções adicionais para personalizar a operação de arrastar e soltar. Você pode optar por personalizar:

* `TargetOptions`:
  + **Timeout** - Specifies the amount of time (in
    seconds) to wait for the API to run before the
    `SelectorNotFoundException` error is
    thrown. The default value is 30 seconds.
  + **DelayAfter** - Delay time (in seconds) after
    executing the API. The default amount of time is 0.3 seconds
    (300 milliseconds).
  + **DelayBefore** - Delay time (in seconds) before the
    API begins performing any operations. The default amount of
    time is 0.2 seconds (200 milliseconds).
* `TargetAnchorableModel` - The location where you
  want to drag and drop the UI element to.
* `NKeyModifiers` - Specify the key modifiers you want
  to use during the drag and drop operation. The following options are
  available: **None**, **Alt**, **Ctrl**, **Shift**, and
  **Win**.
* `NMouseButton` - Specify the mouse button you want to
  use during the drag and drop operation. The following options are
  available: **Left**, **Right**, and **Middle**.
* `CusorMotionType` - Specifies the type of motion
  performed by the mouse cursor. There are two available options:
  + **Instant** - The cursor jumps to the destination. By
    default, **Instant** is selected.
  + **Smooth** - The cursor moves gradually towards the
    destination.
* `UseSourceHover` - Determines whether to hover
  over the source before dragging.
* `DelayBetweenActions` - Delay (in seconds) between
  the actions necessary to perform the drag and drop operation.
* `TargetOptions`:
  + **Timeout** - Specifies the amount of time (in
    seconds) to wait for the API to run before the
    `SelectorNotFoundException` error is
    thrown. The default value is 30 seconds.
  + **DelayAfter** - Delay time (in seconds) after
    executing the API. The default amount of time is 0.3 seconds
    (300 milliseconds).
  + **DelayBefore** - Delay time (in seconds) before the
    API begins performing any operations. The default amount of
    time is 0.2 seconds (200 milliseconds).
* `TargetAnchorableModel` - The location where you
  want to drag and drop the UI element to.
* `NKeyModifiers` - Specify the key modifiers you want
  to use during the drag and drop operation. The following options are
  available: **None**, **Alt**, **Ctrl**, **Shift**, and
  **Win**.
* `NMouseButton` - Specify the mouse button you want to
  use during the drag and drop operation. The following options are
  available: **Left**, **Right**, and **Middle**.
* `CusorMotionType` - Specifies the type of motion
  performed by the mouse cursor. There are two available options:
  + **Instant** - The cursor jumps to the destination. By
    default, **Instant** is selected.
  + **Smooth** - The cursor moves gradually towards the
    destination.
* `UseSourceHover` - Determines whether to hover
  over the source before dragging.
* `DelayBetweenActions` - Delay (in seconds) between
  the actions necessary to perform the drag and drop operation.

DragAndDrop(String, DragAndDropOptions)

Arrasta e solta um elemento de interface gráfica especificado, identificado por uma string do Repositório de Objetos, ao personalizar a ação de arrastar e soltar.

DragAndDrop(
    string target,
    DragAndDropOptions dragAndDropOptions)
DragAndDrop(
    string target,
    DragAndDropOptions dragAndDropOptions)

target String : o elemento de interface gráfica que você deseja arrastar e soltar, identificado por uma string do Repositório de objetos.

dragAndDropOptions DragAndDropOptions : opções adicionais para personalizar a operação de arrastar e soltar. Você pode optar por personalizar:

* `TargetOptions`:
  + **Timeout** - Specifies the amount of time (in
    seconds) to wait for the API to run before the
    `SelectorNotFoundException` error is
    thrown. The default value is 30 seconds.
  + **DelayAfter** - Delay time (in seconds) after
    executing the API. The default amount of time is 0.3 seconds
    (300 milliseconds).
  + **DelayBefore** - Delay time (in seconds) before the
    API begins performing any operations. The default amount of
    time is 0.2 seconds (200 milliseconds).
* `TargetAnchorableModel` - The location where you want
  to drag and drop the UI element to.
* `NKeyModifiers` - Specify the key modifiers you want
  to use during the drag and drop operation. The following options are
  available: **None**, **Alt**, **Ctrl**, **Shift**, and
  **Win**.
* `NMouseButton` - Specify the mouse button you want to
  use during the drag and drop operation. The following options are
  available: **Left**, **Right**, and **Middle**.
* `CusorMotionType` - Specifies the type of motion
  performed by the mouse cursor. There are two available options:
  + **Instant** - The cursor jumps to the destination. By
    default, **Instant** is selected.
  + **Smooth** - The cursor moves gradually towards the
    destination.
* `UseSourceHover` - Determines whether to hover
  over the source before dragging.
* `DelayBetweenActions` - Delay (in seconds) between
  the actions necessary to perform the drag and drop operation.
* `TargetOptions`:
  + **Timeout** - Specifies the amount of time (in
    seconds) to wait for the API to run before the
    `SelectorNotFoundException` error is
    thrown. The default value is 30 seconds.
  + **DelayAfter** - Delay time (in seconds) after
    executing the API. The default amount of time is 0.3 seconds
    (300 milliseconds).
  + **DelayBefore** - Delay time (in seconds) before the
    API begins performing any operations. The default amount of
    time is 0.2 seconds (200 milliseconds).
* `TargetAnchorableModel` - The location where you want
  to drag and drop the UI element to.
* `NKeyModifiers` - Specify the key modifiers you want
  to use during the drag and drop operation. The following options are
  available: **None**, **Alt**, **Ctrl**, **Shift**, and
  **Win**.
* `NMouseButton` - Specify the mouse button you want to
  use during the drag and drop operation. The following options are
  available: **Left**, **Right**, and **Middle**.
* `CusorMotionType` - Specifies the type of motion
  performed by the mouse cursor. There are two available options:
  + **Instant** - The cursor jumps to the destination. By
    default, **Instant** is selected.
  + **Smooth** - The cursor moves gradually towards the
    destination.
* `UseSourceHover` - Determines whether to hover
  over the source before dragging.
* `DelayBetweenActions` - Delay (in seconds) between
  the actions necessary to perform the drag and drop operation.

DragAndDrop(IElementDescriptor, TargetAnchorableModel, NKeyModifiers, NMouseButton, CursorMotionType, Boolean, Double)

Arrasta e solta um elemento de IU especificado, identificado por um descritor de um elemento do Repositório de Objetos e pelo objeto TargetAnchorableModel , enquanto especifica os modificadores de teclas, o botão do mouse e o tipo de movimento do cursor que você deseja usar.

DragAndDrop(
    IElementDescriptor elementDescriptor,
    TargetAnchorableModel destinationTarget,
    [NKeyModifiers? keyModifiers],
    [NMouseButton? mouseButton],
    [CursorMotionType? cursorMotionType],
    [bool? useSourceHover],
    [double? delayBetweenActions])
DragAndDrop(
    IElementDescriptor elementDescriptor,
    TargetAnchorableModel destinationTarget,
    [NKeyModifiers? keyModifiers],
    [NMouseButton? mouseButton],
    [CursorMotionType? cursorMotionType],
    [bool? useSourceHover],
    [double? delayBetweenActions])

elementDescriptor IElementDescriptor : o elemento de interface gráfica que você deseja arrastar e soltar, identificado por um descritor de um elemento do Repositório de objetos.

destinationTarget TargetAnchorableModel : o local para onde você deseja arrastar e soltar o elemento de interface gráfica.

keyModifiers NKeyModifiers : especifique os modificadores de teclas que você deseja usar durante a operação de arrastar e soltar. As seguintes opções estão disponíveis: None, Alt, Ctrl, Shift e Win.

mouseButton NMouseButton : especifique o botão do mouse que você deseja usar durante a operação de arrastar e soltar. As seguintes opções estão disponíveis: Esquerda, Direita e Meio.

cursorMotionType CursorMotionType : Especifica o tipo de movimento realizado pelo cursor do mouse. Há duas opções disponíveis:

* **Instant** - The cursor jumps to the destination. By default,
  **Instant** is selected.
* **Smooth** - The cursor moves gradually towards the
  destination.
* **Instant** - The cursor jumps to the destination. By default,
  **Instant** is selected.
* **Smooth** - The cursor moves gradually towards the
  destination.

useSourceHover Boolean : determina se deve passar o mouse sobre a origem antes de arrastar.

delayBetweenActions Double : Atraso (em segundos) entre as ações necessárias para realizar a operação de arrastar e soltar.

DragAndDrop(String, TargetAnchorableModel, NKeyModifiers, NMouseButton, CursorMotionType, Boolean, Double)

Arrasta e solta um elemento de Interface Gráfica especificado, identificado por uma string do Repositório de Objetos e pelo objeto TargetAnchorableModel , enquanto especifica os modificadores de teclas, o botão do mouse e o tipo de movimento do cursor que você deseja usar.

DragAndDrop(
    string target,
    TargetAnchorableModel destinationTarget,
    [NKeyModifiers? keyModifiers],
    [NMouseButton? mouseButton],
    [CursorMotionType? cursorMotionType],
    [bool? useSourceHover],
    [double? delayBetweenActions])
DragAndDrop(
    string target,
    TargetAnchorableModel destinationTarget,
    [NKeyModifiers? keyModifiers],
    [NMouseButton? mouseButton],
    [CursorMotionType? cursorMotionType],
    [bool? useSourceHover],
    [double? delayBetweenActions])

target String : o elemento de interface gráfica que você deseja arrastar e soltar, identificado por uma string do Repositório de objetos.

destinationTarget TargetAnchorableModel : o local para onde você deseja arrastar e soltar o elemento de interface gráfica.

keyModifiers NKeyModifiers : especifique os modificadores de teclas que você deseja usar durante a operação de arrastar e soltar. As seguintes opções estão disponíveis: None, Alt, Ctrl, Shift e Win.

mouseButton NMouseButton : especifique o botão do mouse que você deseja usar durante a operação de arrastar e soltar. As seguintes opções estão disponíveis: Esquerda, Direita e Meio.

cursorMotionType CursorMotionType : Especifica o tipo de movimento realizado pelo cursor do mouse. Há duas opções disponíveis:

* **Instant** - The cursor jumps to the destination. By default,
  **Instant** is selected.
* **Smooth** - The cursor moves gradually towards the
  destination.
* **Instant** - The cursor jumps to the destination. By default,
  **Instant** is selected.
* **Smooth** - The cursor moves gradually towards the
  destination.

useSourceHover Boolean : determina se deve passar o mouse sobre a origem antes de arrastar.

delayBetweenActions Double : Atraso (em segundos) entre as ações necessárias para realizar a operação de arrastar e soltar.

DragAndDrop(TargetAnchorableModel, DragAndDropOptions)

Arrasta e solta um elemento de interface gráfica especificado, identificado pelo objeto TargetAnchorableModel , enquanto personaliza a ação de arrastar e soltar.

DragAndDrop(
    TargetAnchorableModel target,
    DragAndDropOptions dragAndDropOptions)
DragAndDrop(
    TargetAnchorableModel target,
    DragAndDropOptions dragAndDropOptions)

target TargetAnchorableModel : o elemento de interface gráfica que você deseja arrastar e soltar, identificado pelo objeto TargetAnchorableModel .

dragAndDropOptions DragAndDropOptions : opções adicionais para personalizar a operação de arrastar e soltar. Você pode optar por personalizar:

* `TargetOptions`:
  + **Timeout** - Specifies the amount of time (in
    seconds) to wait for the API to run before the
    `SelectorNotFoundException` error is
    thrown. The default value is 30 seconds.
  + **DelayAfter** - Delay time (in seconds) after
    executing the API. The default amount of time is 0.3 seconds
    (300 milliseconds).
  + **DelayBefore** - Delay time (in seconds) before the
    API begins performing any operations. The default amount of
    time is 0.2 seconds (200 milliseconds).
* `TargetAnchorableModel` - The location where you want
  to drag and drop the UI element to.
* `NKeyModifiers` - Specify the key modifiers you want
  to use during the drag and drop operation. The following options are
  available: **None**, **Alt**, **Ctrl**, **Shift**, and
  **Win**.
* `NMouseButton` - Specify the mouse button you want to
  use during the drag and drop operation. The following options are
  available: **Left**, **Right**, and **Middle**.
* `CusorMotionType` - Specifies the type of motion
  performed by the mouse cursor. There are two available options:
  + **Instant** - The cursor jumps to the destination. By
    default, **Instant** is selected.
  + **Smooth** - The cursor moves gradually towards the
    destination.
* `UseSourceHover` - Determines whether to hover
  over the source before dragging.
* `DelayBetweenActions` - Delay (in seconds) between
  the actions necessary to perform the drag and drop operation.
* `TargetOptions`:
  + **Timeout** - Specifies the amount of time (in
    seconds) to wait for the API to run before the
    `SelectorNotFoundException` error is
    thrown. The default value is 30 seconds.
  + **DelayAfter** - Delay time (in seconds) after
    executing the API. The default amount of time is 0.3 seconds
    (300 milliseconds).
  + **DelayBefore** - Delay time (in seconds) before the
    API begins performing any operations. The default amount of
    time is 0.2 seconds (200 milliseconds).
* `TargetAnchorableModel` - The location where you want
  to drag and drop the UI element to.
* `NKeyModifiers` - Specify the key modifiers you want
  to use during the drag and drop operation. The following options are
  available: **None**, **Alt**, **Ctrl**, **Shift**, and
  **Win**.
* `NMouseButton` - Specify the mouse button you want to
  use during the drag and drop operation. The following options are
  available: **Left**, **Right**, and **Middle**.
* `CusorMotionType` - Specifies the type of motion
  performed by the mouse cursor. There are two available options:
  + **Instant** - The cursor jumps to the destination. By
    default, **Instant** is selected.
  + **Smooth** - The cursor moves gradually towards the
    destination.
* `UseSourceHover` - Determines whether to hover
  over the source before dragging.
* `DelayBetweenActions` - Delay (in seconds) between
  the actions necessary to perform the drag and drop operation.

DragAndDrop(RuntimeTarget, DragAndDropOptions)

Arrasta e solta um elemento de interface gráfica especificado, identificado por uma instância de runtime de um elemento do Repositório de Objetos, enquanto personaliza a ação de arrastar e soltar.

DragAndDrop(
    RuntimeTarget target,
    DragAndDropOptions dragAndDropOptions)
DragAndDrop(
    RuntimeTarget target,
    DragAndDropOptions dragAndDropOptions)

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

dragAndDropOptions DragAndDropOptions : opções adicionais para personalizar a operação de arrastar e soltar. Você pode optar por personalizar:

* `TargetOptions`:
  + **Timeout** - Specifies the amount of time (in
    seconds) to wait for the API to run before the
    `SelectorNotFoundException` error is
    thrown. The default value is 30 seconds.
  + **DelayAfter** - Delay time (in seconds) after
    executing the API. The default amount of time is 0.3 seconds
    (300 milliseconds).
  + **DelayBefore** - Delay time (in seconds) before the
    API begins performing any operations. The default amount of
    time is 0.2 seconds (200 milliseconds).
* `TargetAnchorableModel` - The location where you want
  to drag and drop the UI element to.
* `NKeyModifiers` - Specify the key modifiers you want
  to use during the drag and drop operation. The following options are
  available: **None**, **Alt**, **Ctrl**, **Shift**, and
  **Win**.
* `NMouseButton` - Specify the mouse button you want to
  use during the drag and drop operation. The following options are
  available: **Left**, **Right**, and **Middle**.
* `CusorMotionType` - Specifies the type of motion
  performed by the mouse cursor. There are two available options:
  + **Instant** - The cursor jumps to the destination. By
    default, **Instant** is selected.
  + **Smooth** - The cursor moves gradually towards the
    destination.
* `UseSourceHover` - Determines whether to hover
  over the source before dragging.
* `DelayBetweenActions` - Delay (in seconds) between
  the actions necessary to perform the drag and drop operation.
* `TargetOptions`:
  + **Timeout** - Specifies the amount of time (in
    seconds) to wait for the API to run before the
    `SelectorNotFoundException` error is
    thrown. The default value is 30 seconds.
  + **DelayAfter** - Delay time (in seconds) after
    executing the API. The default amount of time is 0.3 seconds
    (300 milliseconds).
  + **DelayBefore** - Delay time (in seconds) before the
    API begins performing any operations. The default amount of
    time is 0.2 seconds (200 milliseconds).
* `TargetAnchorableModel` - The location where you want
  to drag and drop the UI element to.
* `NKeyModifiers` - Specify the key modifiers you want
  to use during the drag and drop operation. The following options are
  available: **None**, **Alt**, **Ctrl**, **Shift**, and
  **Win**.
* `NMouseButton` - Specify the mouse button you want to
  use during the drag and drop operation. The following options are
  available: **Left**, **Right**, and **Middle**.
* `CusorMotionType` - Specifies the type of motion
  performed by the mouse cursor. There are two available options:
  + **Instant** - The cursor jumps to the destination. By
    default, **Instant** is selected.
  + **Smooth** - The cursor moves gradually towards the
    destination.
* `UseSourceHover` - Determines whether to hover
  over the source before dragging.
* `DelayBetweenActions` - Delay (in seconds) between
  the actions necessary to perform the drag and drop operation.

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