My app displays map annotations that can be dragged to another position of the map. I want to write a UI test that checks what happens when dragging stops.
I found a way (see the docs) to drag an XCUIElement
to another XCUIElement
using
pressForDuration:thenDragToElement:withVelocity:thenHoldForDuration:
I also found a way (see here) to drag the map by pressing and dragging a coordinate.
But I did not find a way to move the element from its current coordinate to another coordinate. This requires to long press the element, and drag it then to the target coordinate.
How can this be done?