本文介绍了EarlGrey 启动了 APP 但屏幕是空白的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在我的 APP 上启动 EarlGrey 测试,但在启动画面打开后,我得到的只是空白屏幕.

Trying to launch EarlGrey tests on my APP but all that I get is empty screen after the splash screen is opened.

我们为启动画面和主应用程序使用了 2 个不同的窗口,第一个窗口看起来像 EarlGrey 堆栈.有没有办法在 EarlGrey 中切换屏幕?

We use 2 different windows for splash screen and main APP and it looks like EarlGrey stacks on the first one. Is there a way to switch the screens in EarlGrey?

我在测试输出中的内容:

That what I have in test output:

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] 应用程序窗口层次结构(按窗口级别排序,从前到后):

图例:[窗口 1] = [最前面的窗口][AX] = [辅助功能]

Legend:[Window 1] = [Frontmost Window][AX] = [Accessibility]

========== 窗口 1 ==========

========== Window 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}};阿尔法=1>UIInputSetContainerView:0x7fbe3bc2cff0;AX=N;AX.frame={{0, 0}, {375, 667}};AX.activationPoint={187.5, 333.5};AX.traits='UIAccessibilityTraitNone';AX.focused='N';帧={{0, 0}, {375, 667}};不透明;阿尔法=1>UIInputSetHostView:0x7fbe3bc24550;AX=N;AX.frame={{0, 667}, {375, 0}};AX.activationPoint={187.5, 667};AX.traits='UIAccessibilityTraitNone';AX.focused='N';框架={{0, 667}, {375, 0}};不透明;阿尔法=1>

========== 窗口 2 ==========

========== Window 2 ==========

UIWindow:0x7fbe3be22b80;AX=N;AX.frame={{0, 0}, {375, 667}};AX.activationPoint={187.5, 333.5};AX.traits='UIAccessibilityTraitNone';AX.focused='N';帧={{0, 0}, {375, 667}};不透明;阿尔法=1>|--UIView:0x7fbe3d55d970;AX=N;AX.frame={{0, 0}, {375, 667}};AX.activationPoint={187.5, 333.5};AX.traits='UIAccessibilityTraitNone';AX.focused='N';帧={{0, 0}, {375, 667}};不透明;阿尔法=1>

推荐答案

感谢您的回答.我发现了一个问题,我们的 APP 中的所有单元测试都有一个特定的设置.禁用这些有助于正确启动应用程序.

Thanks for the answer. I was able to found a problem, there was a specific setting for all the UnitTests in our APP. Disabling of those helped to launch the APP properly.

这篇关于EarlGrey 启动了 APP 但屏幕是空白的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 12:06