UITesting 获取活动应用程序列表失败 [英] UITesting Failure getting list of active application

查看:31
本文介绍了UITesting 获取活动应用程序列表失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个按钮,点击它打开 facebook 登录页面的按钮,点击完成按钮它返回到主视图控制器.

There is a button by clicking on the button it opens facebook login page and clicking on the done button it gets back to the main view controller.

这是我通过录音得到的代码

Here is the code which I got by recording

 override func setUp() {
        super.setUp()
        XCUIApplication().launch()

 }

func testExample() {

        let app = XCUIApplication()
        app.buttons["Button"].tap()
        app.buttons["Done"].tap()
}

但是当我运行录音时,它在 testExample() 的第二行出现错误这是错误:UI 测试失败 - 获取活动应用程序列表失败:AX 错误 -25205

But when I run the recording it gives error in the second line of testExample() Here is the error: UI Testing Failure - Failure getting list of active applications: AX error -25205

推荐答案

请务必在设备上启用 UI Atomation"(设置 > 开发人员).

Be sure to "Enable UI Atomation" on the device (Settings > Developper).

(我必须重新启动我的设备才能使其生效)

(I had to restart my device to make it effective)

这篇关于UITesting 获取活动应用程序列表失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆