Search code examples
iosmapboxkif-frameworkkif

Double tap using KIF


How does one perform a double tap using KIF?

I've tried calling tapViewWithAccessibilityLabel: twice and also add a delay between the two calls, but nothing works. The test don't fail meaning KIF is able to perform the individual taps but I don't know how to get a double tap.

Any ideas?


Solution

  • Try something like this:

    [tester tapScreenAtPoint:CGPointMake(160.0, 284.0)];
    [tester waitForTimeInterval:0.1];
    [tester tapScreenAtPoint:CGPointMake(160.0, 284.0)];
    [tester waitForTimeInterval:5.0];
    

    The important parts are a short wait on the tester between taps and then a long wait on the tester after the taps in order for the gesture to be recognized and processed.