How to acknowledge system alerts automatically using KIF test framework?
Asked Answered
H

1

8

I use KIF to test the UI for continuous integration. When the app is the first launch on a device (or iOS Simulator), the system will show some alert views for security. How can KIF automatically acknowledge system alerts to prevent test from failure?

Hoffert answered 4/5, 2015 at 11:25 Comment(0)
S
8

The best way is to use [tester acknowledgeSystemAlert]. It will click the last button in the system alert :)

For more information see this github thread.

Sleave answered 5/6, 2015 at 22:31 Comment(2)
And for completion's sake, here's the Swift version even if it's obvious: self.viewTester.acknowledgeSystemAlert()Connivent
I dont have viewTester, what is it now instead of viewTester ??Echoism

© 2022 - 2024 — McMap. All rights reserved.