wpf_drag
Simulate a real OS mouse drag between WPF elements by pressing, moving, and releasing using handles, AutomationIds, or coordinate deltas for state-changing UI automation.
Instructions
Drag using the real OS mouse: press, move gradually, release. Supply a source handle or automation_id and either target_handle, target_automation_id OR delta_x/delta_y (omitted delta axis is zero). target_root_handle scopes destination ID lookup independently of the source root_handle. start_x/start_y and target_x/target_y are optional coordinate pairs measured from the corresponding element's top-left in WPF DIPs; default is its center. Deltas are in the source element's local DIPs, including its transforms. button: left/right/middle. duration_ms: 100-10000, default 500. Brings the source window forward and moves the cursor. Both endpoints must be visible and unobstructed; no scrolling during the drag. Success reports input delivery, not drop acceptance: verify properties or a screenshot afterwards. STATE-CHANGING. Target by exactly one of element_handle or automation_id (exact, case-sensitive AutomationProperties.AutomationId). Use root_handle with automation_id to scope lookup; missing or duplicate IDs fail before input.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| button | No | left | |
| delta_x | No | ||
| delta_y | No | ||
| start_x | No | ||
| start_y | No | ||
| target_x | No | ||
| target_y | No | ||
| duration_ms | No | ||
| root_handle | No | ||
| automation_id | No | ||
| target_handle | No | ||
| element_handle | No | ||
| target_root_handle | No | ||
| target_automation_id | No |