Contents

press(forDuration:thenDragTo:)

Initiates a press-and-hold gesture, then drags to another element.

Declaration

func press(forDuration duration: TimeInterval, thenDragTo otherElement: XCUIElement)

Parameters

  • duration:

    The duration of the initial press-and-hold gesture.

  • otherElement:

    The element over which to finish the drag. For example, when reordering table cells, this element is the reorder icon of the destination row.

Discussion

This interaction is suitable for table-cell reordering and similar operations.

See Also

Tapping and pressing