Basically the problem is the same as this one: XCTestCase: Wait for app to idle
I am using perpetually repeating \"background animations\" in my views. The !@#$#$&@
I used h.w.powers' solution in Objective-C, in case anyone needs it.
For setting up:
XCUIApplication *app = [[XCUIApplication alloc] init];
app.launchEnvironment = @{@"UITEST_DISABLE_ANIMATIONS":@"YES"};
[app launch];
and then in your code
if ([[[NSProcessInfo processInfo] environment][@"UITEST_DISABLE_ANIMATIONS"] isEqualToString:@"YES"]) {
// do something like stopping the animation
}