Skip to content

Implement drag and drop action #7

@devload

Description

@devload

Description

Add support for drag and drop gestures to move UI elements.

Requirements

  • Implement DragAction class
  • Support drag from (x1, y1) to (x2, y2)
  • Support drag element to target element
  • Add duration parameter (default 500ms)
  • Integrate with ADB input swipe command

Files

  • smartmonkey/exploration/action.py (add DragAction)
  • smartmonkey/device/event_manager.py (add drag method)

Usage example

# Drag from point to point
DragAction(from_x=100, from_y=200, to_x=500, to_y=800, duration=500)

# Drag element to target
DragAction(element=source_elem, target=target_elem)

Acceptance Criteria

  • DragAction class implemented
  • ADB swipe command integration
  • Duration parameter support
  • Element-to-element drag support
  • Unit tests added

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionsUser interaction actions (tap, drag, zoom, etc)enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions