Disabling waiting for idle state in UI testing of iOS apps

后端 未结 5 1126
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-04 12:37

Basically the problem is the same as this one: XCTestCase: Wait for app to idle

I am using perpetually repeating \"background animations\" in my views. The !@#$#$&@

5条回答
  •  悲&欢浪女
    2021-02-04 12:48

    I was using gh123man's solution in setUp() of a couple of test classes and it worked like a charm until updating to iOS 13.3. Since then app gets stuck in launching state.

    Found that it still works if I move it to methods like disableWaitForIdle() and enableWaitForIdle() and call them only in the most granular manner (before and after the tap where I know the app will never become idle), e.g. like this:

    @discardableResult func selectOption() -> Self {
        disableWaitForIdle()
        app.cells["Option"].firstMatch.waitAndForceTap(timeout: 20)
        enableWaitForIdle()
        return self
    }
    

提交回复
热议问题