KIF Framework for iOS: can it mimic the touch and hold gesture?

How to simulate a touch-and-hold step in a view using the iOS KIF frame


source to share

2 answers

Functions are now built into the structure. You can use it like this:

[steps addObject:[KIFTestStep stepToLongPressViewWithAccessibilityLabel:@"myView" duration:5]];


[scenario addStep:[KIFTestStep stepToLongPressViewWithAccessibilityLabel:@"myView" duration:5]];

Obviously, the first is to add to a step

and the second to a scenario




As you probably know, KIF does not emulate gestures. The emulating gestures are really just testing iOS level stuff. The suggested challenge is to simply call a method that will be called for gestures in your TestStep and navigate from there.



All Articles