问题描述
在使用Appium和android驱动程序的android Automation中,有什么方法可以执行以下过程吗?
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 background.Open the app from same screen after some time interval.
如果有人知道,请帮助.
Please help if anybody knows.
推荐答案
-
尝试着重于您当前的活动:
Try to focus on the current activity you were in :
(AppiumDriver)driver.runAppInBackground(10); (AppiumDriver)driver.currentActivity();
(AppiumDriver)driver.runAppInBackground(10); (AppiumDriver)driver.currentActivity();
或
-
尝试开始与您以前相同的活动:
Try to start the same activity you were in :
(AppiumDriver)driver.runAppInBackground(10);
(AppiumDriver)driver.startActivity("appPackage","com.example.android.apis", null, null);(AppiumDriver)driver.runAppInBackground(10);
(AppiumDriver)driver.startActivity("appPackage","com.example.android.apis", null, null);这篇关于如何在后台将应用程序推送到带有硒的Appium中并从同一屏幕启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
-