How do I simulate a touch-and-hold step on a view using the KIF-framework for iOS
Asked
Active
Viewed 1,107 times
2 Answers
4
There are functions built into the framework now. You can use it like this:
[steps addObject:[KIFTestStep stepToLongPressViewWithAccessibilityLabel:@"myView" duration:5]];
or
[scenario addStep:[KIFTestStep stepToLongPressViewWithAccessibilityLabel:@"myView" duration:5]];
Obviously the first is for adding to a step
and the second is for a scenario
.

SirRupertIII
- 12,324
- 20
- 72
- 121
-
How to use this with KIF 3.0? – Kate Geld Dec 08 '14 at 13:55
0
As you probably know KIF doesn't emulate gestures. Emulating gestures is really just testing iOS layer stuff anyway. The suggested thing to do is to just call the method that would be invoked for the gesture in your TestStep and go from there.

NKijak
- 1,174
- 9
- 19