Search code examples
iosobjective-ctestingaccessibilitykif

Accessibility label wih iOS ViewController presented as a form sheet


I am making use of a Presentation: Form Sheet in my app. So my ViewController gets displayed as a form with the black semi-transparent overlay around it.

I have implemented the logic to dismiss everything should the user tap anywhere outside my form sheet ViewController.

I would like to test this behavior but I'm not sure how to simulate the tap. How can I set an accessibility label to simulate this tap with a UI test?

Or any other suggestions how I can test this behavior?

Thanks!


Solution

  • You just want to click anywhere on the screen to dismiss everything?

        [tester tapScreenAtPoint:CGPoint];
    

    does that for you.

    Most stuff about KIF is explained here: http://www.raywenderlich.com/61419/ios-ui-testing-with-kif