press(forDuration:)
Sends a press-and-hold gesture to a hittable point the system computes for the element, holding for the duration you specify.
Declaration
func press(forDuration duration: TimeInterval)Parameters
- duration:
The duration of the press, in seconds.
Discussion
If the element exists within a scrollable view but is offscreen, XCTest attempts to scroll the element onscreen before performing the press.