Disable animations during UI Testing
suggest changeXCUIApplication does not treat an animations environment value as a switch. The app under test has to turn its own animations off. Pass a launch argument, and check it at startup:
app.launchArguments.append("UITEST_DISABLE_ANIMATIONS")
app is the XCUIApplication. In the app, before the first screen appears:
if ProcessInfo.processInfo.arguments.contains("UITEST_DISABLE_ANIMATIONS") {
UIView.setAnimationsEnabled(false)
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents