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

前端 未结 10 966
一向
一向 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:26

    Here it is how it works.

    1. Code for Running the App in back ground

      ((AppiumDriver)driver).runAppInBackground(Duration.ofSeconds(10));
      
    2. Get back back to the current activity again

      ((StartsActivity)driver).currentActivity();
      

提交回复
热议问题