Espresso testing disable animation

后端 未结 3 1787
臣服心动
臣服心动 2020-12-30 21:42

@Test
    public void test3_PaySuccessful(){
        init();

    ViewInteraction amountEditText = onView(
            allOf(withId(R.id.et_amount), isDispl         


        
3条回答
  •  生来不讨喜
    2020-12-30 22:10

    You could take a look at this repo

    Build the project and download the generated .apk file and follow the instructions mentioned in that project to disable the animations and you should have a smooth sailing afterwards. You could also download the same .apk file from a lot of other sources. Once you have the .apk file then issue the following commands:

    adb install -r android_emulator_hacks.apk
    adb shell pm grant no.finn.android_emulator_hacks android.permission.SET_ANIMATION_SCALE
    adb shell am start -n no.finn.android_emulator_hacks/no.finn.android_emulator_hacks.HackActivity
    

    This will take care of disabling the system animations for you.

提交回复
热议问题