How to disable animations in code when running Espresso tests

后端 未结 3 1875
眼角桃花
眼角桃花 2020-12-29 08:54

Has anybody managed to disable animations through code when running Espresso tests? I\'ve been trying to follow the instructions in this webpage (linked to from he

3条回答
  •  遥遥无期
    2020-12-29 09:46

    I'm executing these three commands for each animation type and they are working for me:

    adb shell settings put global window_animation_scale 0.0
    adb shell settings put global transition_animation_scale 0.0
    adb shell settings put global animator_duration_scale 0.0
    

    More information here - prepare android emulator for UI test automation.

提交回复
热议问题