我的UI测试失败,因为测试等待无休止,直到应用程序闲置.我无法看到背景中发生了任何事情,比如加载微调器.
它只出现在一个选项卡上.所有其他选项卡都是可点击的,但测试在屏幕3上失败.在屏幕3上测试后,单击另一个选项卡,测试恢复并成功完成.
有任何想法吗?
- (void)testExample
{
XCUIElementQuery* tabBarsQuery = self.app.tabBars;
[tabBarsQuery.buttons[@"Screen2"] tap];
[tabBarsQuery.buttons[@"Screen3"] tap];
[tabBarsQuery.buttons[@"Screen1"] tap];
[tabBarsQuery.buttons[@"Screen4"] tap];
}
Run Code Online (Sandbox Code Playgroud)