UITesting Failure getting list of active application

泪湿孤枕 提交于 2019-12-08 04:41:20

问题


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()
}

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


回答1:


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

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



来源:https://stackoverflow.com/questions/37674710/uitesting-failure-getting-list-of-active-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!