Instance Method

tap()

Sends a tap event to a hittable point computed for the element.

Declaration

func tap()

Discussion

If the element exists within a scrollable view but is offscreen, XCTest will attempt to scroll the element onscreen before performing the tap.

See Also

Tapping and Pressing

func doubleTap()

Sends a double tap event to a hittable point computed for the element.

func press(forDuration: TimeInterval)

Sends a long press gesture to a hittable point computed for the element, holding for the specified duration.

func press(forDuration: TimeInterval, thenDragTo: XCUIElement)

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