Instance Method

clickForDuration:thenDragToElement:

Clicks and holds for a specified duration (generally long enough to start a drag operation) then drags to the other element.

Declaration

- (void)clickForDuration:(NSTimeInterval)duration thenDragToElement:(XCUIElement *)otherElement;

Discussion

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

See Also

Clicking

- click

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

- doubleClick

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

- rightClick

Sends a right click event to a hittable point computed for the element.