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 6 mars 2026

Glisser et déposer

Exécute une opération de glisser-déposer de l’élément d’interface utilisateur source vers l’élément d’interface utilisateur de destination.

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
DragAndDrop(IElementDescriptor, DragAndDropOptions)Déplace un élément d'IU spécifié, identifié par un descripteur d'un élément du Référentiel d'objets, tout en personnalisant l'action de glisser-déposer.
DragAndDrop(String, DragAndDropOptions)Déplace un élément d’IU spécifié, identifié par une chaîne à partir du Référentiel d’objets, tout en personnalisant l’action de glisser-déposer.
DragAndDrop(IElementDescriptor, TargetAnchorableModel, NKeyModifiers, NMouseButton, CursorMotionType, Boolean, Double)Glisse et dépose un élément d'IU spécifié, identifié par un descripteur d'un élément du Référentiel d'objets et par l'objet TargetAnchorableModel , tout en spécifiant les modificateurs de touches, le bouton de la souris et le type de mouvement du curseur à utiliser.
DragAndDrop(String, TargetAnchorableModel, NKeyModifiers, NMouseButton, CursorMotionType, Boolean, Double)Glisse et dépose un élément d'IU spécifié, identifié par une chaîne du Référentiel d'objets et un par l'objet TargetAnchorableModel , tout en spécifiant les modificateurs de touches, le bouton de la souris et le type de mouvement du curseur à utiliser.
DragAndDrop(TargetAnchorableModel, DragAndDropOptions)Déplace un élément d'IU spécifié, identifié par l'objet TargetAnchorableModel , tout en personnalisant l'action de glisser-déposer.
DragAndDrop(RuntimeTarget, DragAndDropOptions)Faites glisser et déposez un élément d’IU spécifié, identifié par une instance de runtime d’un élément du référentiel d’objets, tout en personnalisant l’action de glisser-déposer.

DragAndDrop(IElementDescriptor, DragAndDropOptions)

Déplace un élément d'interface utilisateur spécifié, identifié par un descripteur d'un élément d'interface utilisateur du référentiel d'objets, tout en personnalisant l'action de glisser-déposer.

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

elementDescriptor IElementDescriptor : l’élément d’IU que vous souhaitez faire glisser et déposer, identifié par un descripteur d’un élément d’IU du référentiel d’objets.

dragAndDropOptions DragAndDropOptions : options supplémentaires pour personnaliser l'opération de glisser-déposer. Vous pouvez choisir de personnaliser :

* `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)

Déplace un élément d’IU spécifié, identifié par une chaîne à partir du Référentiel d’objets, tout en personnalisant l’action de glisser-déposer.

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

target String : l’élément d’IU que vous souhaitez glisser-déposer, identifié par une chaîne du référentiel d’objets.

dragAndDropOptions DragAndDropOptions : options supplémentaires pour personnaliser l'opération de glisser-déposer. Vous pouvez choisir de personnaliser :

* `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)

Glisse et dépose un élément d'IU spécifié, identifié par un descripteur d'un élément du Référentiel d'objets et par l'objet TargetAnchorableModel , tout en spécifiant les modificateurs de touches, le bouton de la souris et le type de mouvement du curseur à utiliser.

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 : l’élément d’IU que vous souhaitez glisser-déposer, identifié par un descripteur d’un élément du référentiel d’objets.

destinationTarget TargetAnchorableModel : l’emplacement où vous souhaitez glisser-déposer l’élément d’IU.

keyModifiers NKeyModifiers : spécifiez les modificateurs de touche que vous souhaitez utiliser pendant l'opération de glisser-déposer. Les options suivantes sont disponibles : Aucun, Alt, Ctrl, Maj,et Win.

mouseButton NMouseButton : spécifiez le bouton de la souris que vous souhaitez utiliser pendant l'opération de glisser-déposer. Les options suivantes sont disponibles : Gauche, Droite, Milieu.

cursorMotionType CursorMotionType : spécifie le type de mouvement effectué par le curseur de la souris. Deux options sont 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 : détermine s’il faut survoler la source avant de glisser.

delayBetweenActions Double : Délai (en secondes) entre les actions nécessaires pour effectuer l’opération de glisser-déposer.

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

Glisse et dépose un élément d'IU spécifié, identifié par une chaîne du Référentiel d'objets et un par l'objet TargetAnchorableModel , tout en spécifiant les modificateurs de touches, le bouton de la souris et le type de mouvement du curseur à utiliser.

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 : l’élément d’IU que vous souhaitez glisser-déposer, identifié par une chaîne du référentiel d’objets.

destinationTarget TargetAnchorableModel : l’emplacement où vous souhaitez glisser-déposer l’élément d’IU.

keyModifiers NKeyModifiers : spécifiez les modificateurs de touche que vous souhaitez utiliser pendant l'opération de glisser-déposer. Les options suivantes sont disponibles : Aucun, Alt, Ctrl, Maj,et Win.

mouseButton NMouseButton : spécifiez le bouton de la souris que vous souhaitez utiliser pendant l'opération de glisser-déposer. Les options suivantes sont disponibles : Gauche, Droite, Milieu.

cursorMotionType CursorMotionType : spécifie le type de mouvement effectué par le curseur de la souris. Deux options sont 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 : détermine s’il faut survoler la source avant de glisser.

delayBetweenActions Double : Délai (en secondes) entre les actions nécessaires pour effectuer l’opération de glisser-déposer.

DragAndDrop(TargetAnchorableModel, DragAndDropOptions)

Déplace un élément d'IU spécifié, identifié par l'objet TargetAnchorableModel , tout en personnalisant l'action de glisser-déposer.

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

target TargetAnchorableModel : l’élément d’IU que vous souhaitez glisser-déposer, identifié par l’objet TargetAnchorableModel .

dragAndDropOptions DragAndDropOptions : options supplémentaires pour personnaliser l'opération de glisser-déposer. Vous pouvez choisir de personnaliser :

* `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)

Faites glisser et déposez un élément d’IU spécifié, identifié par une instance de runtime d’un élément du référentiel d’objets, tout en personnalisant l’action de glisser-déposer.

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

target RuntimeTarget : l’élément d’IU que vous souhaitez glisser-déposer, identifié par une instance de runtime d’un élément du référentiel d’objets.

dragAndDropOptions DragAndDropOptions : options supplémentaires pour personnaliser l'opération de glisser-déposer. Vous pouvez choisir de personnaliser :

* `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.

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