UIAutomation Instrument 异常“目标应用程序不是最前面的”
我有一个使用 CLLocationManager
的 iOS5 iPad 应用程序,我正在使用 UIAutomation
对其进行测试。
在运行测试脚本之前,我在使用 CLLocationManager 时在 iOS 呈现的对话框中手动按“确定”。
有时,我的测试脚本将无法启动。我按下 Instruments
中的“播放”图标,12 秒内没有任何反应。然后,我得到以下异常:
Target app is not frontmost
一旦发生这种情况,我通常必须重新启动才能使仪器再次工作。
当我将 CLLocationManager 对话框留在应用程序前面时,我曾经遇到过同样的异常。有谁知道如何解决这个问题?
I have an iOS5 iPad app that uses CLLocationManager
that I'm testing with UIAutomation
.
Before I run my test script, I manually press "OK" on the dialog that iOS presents when I use CLLocationManager.
Occassionally, my test scripts will fail to start. I press the "Play" icon in Instruments
, and nothing happens for 12 seconds. Then, I get the following exception:
Target app is not frontmost
Once this happens, I usually have to restart to get instruments to work again.
I used to get this same exception when I left the CLLocationManager
dialog in front of my application. Does anyone have any idea about how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当应用程序完全启动之前弹出警报视图时,就会发生这种情况。这是自动化的一个错误。
This happens when an alert view pops up before the app finishes launching fully. It's a bug with automation.