How to push app in background and launch from same screen in Appium with selenium

前端 未结 10 975
一向
一向 2021-01-07 06:44

Is there any way to do the following process in android Automation using Appium with android driver?

Press home button from some specific screen. Put app in backgrou

10条回答
  •  盖世英雄少女心
    2021-01-07 07:32

    You can use this snippet of code

    ((AppiumDriver)driver).runAppInBackground(Duration.ofSeconds(10));
    ((StartsActivity)driver).currentActivity();
    

    If it is not working then please update your appium with the latest version and try with the same snippet of code.

    Thanks

提交回复
热议问题