Tag: earlgrey

EarlGrey启动应用程序,但屏幕是空白的

试图在我的APP上启动EarlGreytesting,但是在启动屏幕打开后,我所得到的只是空白屏幕。 我们使用2个不同的窗口作为启animation面和主APP,它看起来像EarlGrey堆栈的第一个。 有没有办法切换EarlGrey中的屏幕? 那我在testing输出中有: 2016-03-03 15:00:25.721 XING [23504:165847]无法启动com.apple.AXInspector [268435460 – 端口:31499] 2016-03-03 15:00:49.001 XING [23504:165847]应用程序窗口层次结构(按照窗口级别从前到后sorting): 图例:[窗口1] = [最前面的窗口] [AX] = [无障碍] ==========窗口1 ========== UITextEffectsWindow:0x7fbe3bf10e50; AX = N; AX.frame = {{0,0},{375,667}}; AX.activationPoint = {187.5,333.5}; AX.traits = 'UIAccessibilityTraitNone'; AX.focused = 'N'; 帧= {{0,0},{375,667}}; alpha = 1> UIInputSetContainerView:0x7fbe3bc2cff0; AX = N; AX.frame = {{0,0},{375,667}}; AX.activationPoint = {187.5,333.5}; AX.traits […]

是否有可能使用EarlGrey(iOS UItesting)解除系统警报?

我现在已经开始尝试使用XCUITest几个月的UItesting了一下EarlGrey。 我遇到了无法解除系统警报的经典问题,这很奇怪,因为Google似乎为系统警报(称为grey_systemAlertViewShown())实施了匹配器。 我正在尝试使用GREYCondition检测系统警报。 以下是我所尝试的: – (void)waitForAndDismissSystemAlertForSeconds:(NSInteger)seconds { GREYCondition *interactableCondition = [GREYCondition conditionWithName:@"isInteractable" block:^BOOL{ // Fails if element is not interactable NSError *error; [[EarlGrey selectElementWithMatcher:grey_systemAlertViewShown()] assertWithMatcher:grey_interactable() error:&error]; if (error) { return NO; } else { NSError *allowButtonError; [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(@"Allow")] assertWithMatcher:grey_notNil() error:&allowButtonError]; if (!allowButtonError) { [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(@"Allow")] performAction:grey_tap()]; } return YES; }]; [interactableCondition waitWithTimeout:seconds]; } 我也尝试使用addUIInterruptionMonitorWithDescription(如下所示)(但使用EarlGrey代码基本上是在中断监视器上做的事情): Xcode […]