首页 > 解决方案 > 获取主窗口时出错 kAXErrorServerNotFound - 找不到目标应用程序

问题描述

由于找不到目标应用程序,我的 XCUITest 将在一个屏幕上失败:

有人可以在这里提出一些建议吗?我不明白为什么第一次登陆这个屏幕时脚本仍然可以找到应用程序,但是几秒钟后,它不能?多谢!

------------ 这是日志------------

t =    22.83s Tap Target Application 'com.ss.bbapp'
t =    22.83s     Wait for com.ss.bbapp to idle
t =    22.89s     Find the Target Application 'com.ss.bbapp'
t =    23.98s         Find the Target Application 'com.ss.bbapp' (retry 1)
t =    25.04s         Find the Target Application 'com.ss.bbapp' (retry 2)
t =    25.21s     Assertion Failure: SearchScreen.swift:219: Error getting main window kAXErrorServerNotFound
t =    25.25s Tear Down

标签: swiftxcodexcuitest

解决方案


推荐阅读