Android Espresso: PerformException

前端 未结 7 2011
春和景丽
春和景丽 2020-12-30 22:59

I`m getting

android.support.test.espresso.PerformException: Error performing \'send keyCode: 4, metaState: 0 key event\' on view \'Animations or tra

7条回答
  •  被撕碎了的回忆
    2020-12-30 23:38

    Animations or transitions are enabled on the target device.

    Espresso doesn't work well with animations due to the visual state delays they introduce. You need to disable animations on your device. Firstly, enable developer options:

    1. Open the Settings app.
    2. Scroll to the bottom and select About phone.
    3. Scroll to the bottom and tap Build number 7 times.
    4. Return to the previous screen to find Developer options near the bottom.

    Access Developer Options from Settings app, and under the Drawing section, switch all of the following options to Animation Off:

    • Window animation scale
    • Transition animation scale
    • Animator duration scale

提交回复
热议问题