UiPath Documentation
activities
latest
false
Importante :
Este contenido se ha localizado parcialmente a partir de un sistema de traducción automática. La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.
UiPath logo, featuring letters U and I in white

Actividades UIAutomation

Última actualización 28 de abr. de 2026

Arrastrar y soltar

Ejecuta una operación de arrastrar y soltar desde el elemento de la interfaz de usuario de origen al elemento de la interfaz de usuario de destino.

Esta API debe añadirse después de Abrir o Adjuntar.

Definición

Espacio de nombres: UiPath.UIAutomationNext.API.Models

Ensamblado: UiPath.UIAutomationNext.API.Models (en UiPath.UIAutomationNext.API.Models dll)

Sobrecargas

SobrecargaDescripción
DragAndDrop(IElementDescriptor, DragAndDropOptions)Arrastra y suelta un elemento de la IU especificado, identificado por un descriptor de un elemento del Repositorio de objetos, mientras se personaliza la acción de arrastrar y soltar.
DragAndDrop(String, DragAndDropOptions)Arrastra y suelta un elemento de la IU especificado, identificado por una cadena del Repositorio de objetos, mientras se personaliza la acción de arrastrar y soltar.
DragAndDrop(IElementDescriptor, TargetAnchorableModel, NKeyModifiers, NMouseButton, CursorMotionType, Boolean, Double)Arrastra y suelta un elemento de la IU especificado, identificado por un descriptor de un elemento del Repositorio de objetos y por el objeto TargetAnchorableModel , al tiempo que especifica los modificadores de teclas, el botón del ratón y el tipo de movimiento del cursor que quieres utilizar.
DragAndDrop(String, TargetAnchorableModel, NKeyModifiers, NMouseButton, CursorMotionType, Boolean, Double)Arrastra y suelta un elemento de la IU especificado, identificado por una cadena del Repositorio de objetos y por el objeto TargetAnchorableModel , al tiempo que especifica los modificadores de teclas, el botón del ratón y el tipo de movimiento del cursor que quieres utilizar.
DragAndDrop(TargetAnchorableModel, DragAndDropOptions)Arrastra y suelta un elemento de la IU especificado, identificado por el objeto TargetAnchorableModel , mientras personaliza la acción de arrastrar y soltar.
DragAndDrop(RuntimeTarget, DragAndDropOptions)Arrastra y suelta un elemento de la IU especificado, identificado por una instancia de tiempo de ejecución de un elemento del Repositorio de objetos, mientras se personaliza la acción de arrastrar y soltar.

DragAndDrop(IElementDescriptor, DragAndDropOptions)

Arrastra y suelta un elemento de la IU especificado, identificado por un descriptor de un elemento de la IU del Repositorio de objetos, mientras se personaliza la acción de arrastrar y soltar.

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

elementDescriptor IElementDescriptor : el elemento de la IU que quieres arrastrar y soltar, identificado por un descriptor de un elemento de la IU del repositorio de objetos.

dragAndDropOptions DragAndDropOptions : opciones adicionales para personalizar la operación de arrastrar y soltar. Puedes elegir 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)

Arrastra y suelta un elemento de la IU especificado, identificado por una cadena del Repositorio de objetos, mientras se personaliza la acción de arrastrar y soltar.

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

target String : el elemento de la IU que quieres arrastrar y soltar, identificado por una cadena del Repositorio de objetos.

dragAndDropOptions DragAndDropOptions : opciones adicionales para personalizar la operación de arrastrar y soltar. Puedes elegir 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)

Arrastra y suelta un elemento de la IU especificado, identificado por un descriptor de un elemento del Repositorio de objetos y por el objeto TargetAnchorableModel , al tiempo que especifica los modificadores de teclas, el botón del ratón y el tipo de movimiento del cursor que quieres utilizar.

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 : el elemento de la IU que quieres arrastrar y soltar, identificado por un descriptor de un elemento del repositorio de objetos.

destinationTarget TargetAnchorableModel : la ubicación a la que quieres arrastrar y soltar el elemento de la IU.

keyModifiers NKeyModifiers : especifica los modificadores de teclas que quieres utilizar durante la operación de arrastrar y soltar. Las siguientes opciones están disponibles: Ninguno, Alt, Ctrl, Mayúsculas y Win.

mouseButton NMouseButton : especifica el botón del ratón que quieres utilizar durante la operación de arrastrar y soltar. Las siguientes opciones están disponibles: Izquierda, Derecha y Medio.

cursorMotionType CursorMotionType : especifica el tipo de movimiento realizado por el cursor del ratón. Hay dos opciones disponibles:

* **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 si pasar el ratón por encima del origen antes de arrastrarlo.

delayBetweenActions Double : retraso (en segundos) entre las acciones necesarias para realizar la operación de arrastrar y soltar.

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

Arrastra y suelta un elemento de la IU especificado, identificado por una cadena del Repositorio de objetos y por el objeto TargetAnchorableModel , al tiempo que especifica los modificadores de teclas, el botón del ratón y el tipo de movimiento del cursor que quieres utilizar.

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 : el elemento de la IU que quieres arrastrar y soltar, identificado por una cadena del Repositorio de objetos.

destinationTarget TargetAnchorableModel : la ubicación a la que quieres arrastrar y soltar el elemento de la IU.

keyModifiers NKeyModifiers : especifica los modificadores de teclas que quieres utilizar durante la operación de arrastrar y soltar. Las siguientes opciones están disponibles: Ninguno, Alt, Ctrl, Mayúsculas y Win.

mouseButton NMouseButton : especifica el botón del ratón que quieres utilizar durante la operación de arrastrar y soltar. Las siguientes opciones están disponibles: Izquierda, Derecha y Medio.

cursorMotionType CursorMotionType : especifica el tipo de movimiento realizado por el cursor del ratón. Hay dos opciones disponibles:

* **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 si pasar el ratón por encima del origen antes de arrastrarlo.

delayBetweenActions Double : retraso (en segundos) entre las acciones necesarias para realizar la operación de arrastrar y soltar.

DragAndDrop(TargetAnchorableModel, DragAndDropOptions)

Arrastra y suelta un elemento de la IU especificado, identificado por el objeto TargetAnchorableModel , mientras personaliza la acción de arrastrar y soltar.

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

target TargetAnchorableModel : el elemento de la IU que quieres arrastrar y soltar, identificado por el objeto TargetAnchorableModel .

dragAndDropOptions DragAndDropOptions : opciones adicionales para personalizar la operación de arrastrar y soltar. Puedes elegir 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)

Arrastra y suelta un elemento de la IU especificado, identificado por una instancia de tiempo de ejecución de un elemento del Repositorio de objetos, mientras se personaliza la acción de arrastrar y soltar.

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

target RuntimeTarget : el elemento de la IU que quieres arrastrar y soltar, identificado por una instancia de tiempo de ejecución de un elemento del repositorio de objetos.

dragAndDropOptions DragAndDropOptions : opciones adicionales para personalizar la operación de arrastrar y soltar. Puedes elegir 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.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado