I try to make some scenarios with the KIF framework. When I adding for example:
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"MyUIButtonAccessibilityLabel"]];
the UIControlEventTouchUpInside is not fired for the UIButton with accessibilityLabel @”MyUIButtonAccessibilityLabel”.
Is uigesturerecognizer interfering with the UIControlEventTouchUpInside in KIF? Is there a work-around for this in KIF?
I actually ran into this yesterday. stepToTapViewWithAccessibilityLabel has worked just fine for everything in my app, but I encountered a button that it just absolutely won’t work for.
To work around it, I ended up using stepToTapScreenAtPoint (which I don’t especially like), but it seems to work fine. I also added a void initialize method to my category so that I can determine which device is executing the tests at run-time and based on that, figure out where exactly I need to tap: