Contents

press(forDuration:thenDragTo:)

Initiates a press-and-hold gesture at the coordinate, then drags to another coordinate.

Declaration

func press(forDuration duration: TimeInterval, thenDragTo otherCoordinate: XCUICoordinate)

Parameters

  • duration:

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

  • otherCoordinate:

    The coordinate to finish the drag gesture over.

Discussion

This method is available in iOS and for Touch Bar interactions in macOS.

See Also

Tapping and pressing