Skip to content

Drag and Drop Activity

The Drag Drop activity simulates a drag-and-drop interaction between two elements within a native Windows desktop application, picking up a source element and releasing it onto a target element.

Field Description Requirement
Application instance The reference name of the application instance previously opened or attached. Required
Source element The JSON-based selector identifying the element to be dragged. Required
Source label An alternative to Source element that identifies the drag source by label instead of a selector. Optional
Source label match type Defines how Source label is compared against candidate elements (e.g., Equals, Contains). Optional
Target element The JSON-based selector identifying the element the source will be dropped onto. Required
Target label An alternative to Target element that identifies the drop target by label instead of a selector. Optional
Target label match type Defines how Target label is compared against candidate elements (e.g., Equals, Contains). Optional
Source X offset Adjusts the horizontal pick-up position relative to the source element by a specified pixel value. Optional
Source Y offset Adjusts the vertical pick-up position relative to the source element by a specified pixel value. Optional
Target X offset Adjusts the horizontal drop position relative to the target element by a specified pixel value. Optional
Target Y offset Adjusts the vertical drop position relative to the target element by a specified pixel value. Optional

Action Types & Examples

Element-to-Element Drag

  • Format: string (element locator)
  • Example Result: Source list item dropped onto a target container.

Implementation Examples

Field Setup - Application instance: ${appInstance} - Source element: the list item identified by the UI Automation Inspector - Target element: the target container identified by the UI Automation Inspector

Technical Notes

Source label/Target label provide an alternative to Source element/Target element for identifying elements when a stable selector is not available. Offsets are applied relative to each element's position and are useful when the pick-up or drop point must land on a specific sub-area rather than the element's center.