【发布时间】:2022-07-08 16:42:47
【问题描述】:
// tap photo auth entrance
XCUIElement *collectionView = app.collectionViews.firstMatch;
XCUIElement *authCell = [collectionView.cells elementBoundByIndex:2];
[authCell tap];
// springboard click allow
XCUIApplication *springboard = [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"];
XCUIElement *button = [[springboard.alerts.firstMatch buttons] elementBoundByIndex:1];
BOOL exist = [button waitForExistenceWithTimeout:5];
XCTAssertEqual(exist, YES, @"photo auth alert not exist");
[button tap];
在我的iphone12(iOS15.4)上可以正常使用,但是在其他iphone12-Pro(iOS15.4)上就不行了
错误: *** -[__NSArrayM insertObject:atIndex:]: 对象不能为 nil (NSInvalidArgumentException)
我应该如何解决这个问题? 非常感谢!
【问题讨论】:
-
帮助........
标签: xcode alert xctest uitest springboard