0

有人可以帮我解决如果测试因 kGREYPendingViewsToDisappear 失败而需要做的事情,如下例所示

代码

EarlGrey.selectElement(with: gray_keyWindow()).assert(grey_sufficientlyVisible())

例外

UI 测试活动:断言失败:EarlGreyTests.swift:27:异常:TimeoutException

异常名称:TimeoutException 异常原因:等待执行断言时超时。断言异常:{ "Assertion Criteria": "assertWithMatcher:matcherForSufficientlyVisible(>=0.750000)", "Element Matcher": "(kindOfClass('UIWindow') && keyWindow)" }

异常详细信息:错误跟踪:[{“描述”:“无法执行块,因为下面的空闲资源很忙。”,“描述词汇表”:{“GREYAppStateTracker”:“等待viewDidDisappear:调用视图控制器。请确保这个视图控制器和它的子类调用它们的超级实现。

所有对象的完整状态转换调用堆栈:=> 等待 viewDidDisappear:在视图控制器上调用。请确保此视图控制器及其子类调用它们的超级实现。( 0 EarlGrey 0x0000000133ea1d3d -[GREYAppStateTrackerObject setState:] + 61 1 EarlGrey 0x0000000133e49685 _133-[GREYAppStateTracker grey_changeState:usingOperation:forObject:orInternalObjectDeallocationTracker:orExternalAppStateTrackerObject:]_block_invoke + 1157 2 EarlGrey 0x0000000133e48858 -[GREYAppStateTracker grey_performBlockInCriticalSection:] + 328 3 EarlGrey 0x0000000133e490ab -[GREYAppStateTracker gray_changeState:usingOperation:forObject:orInternalObjectDeallocationTracker:

什么解决方法不起作用

在 FeedItemCollectionViewController 中添加 viewDidDisappear

4

0 回答 0