Drag and Drop
Last updated
Last updated
This feature is currently in Beta for Android Only.
Occasionally, you may need to long-press and drag an item to move it across the screen.
Trigger using the runScript command.
Copy this snippet to try it your tests:
from - A text identifier from the app hierarchy. Moropo will drag from the center of this element.
above - Use instead of 'from'. This will select a point 120 pixels above the text identifier. This is useful for dragging an Android widget.
end - The drop location as a percentage-based coordinate (.e.g. 40%,40%
).
duration - The number of milliseconds to drag action takes (defaults to 1000
)
Need more parameters for your use case? Drop us a message, and we'll extend the API.