如何在后台推送应用程序并在 Appium 中使用 selenium 从同一屏幕启动 [英] How to push app in background and launch from same screen in Appium with selenium

查看:15
本文介绍了如何在后台推送应用程序并在 Appium 中使用 selenium 从同一屏幕启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么办法可以在android Automation中使用带有android驱动程序的Appium来完成以下过程?

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.

如果有人知道请帮忙.

推荐答案

iOS和Android都支持以下方法:

Both iOS and Android support the following methods :

(AppiumDriver)driver.runAppInBackground(10);//put app in background for 10 seconds
(AppiumDriver)driver.launchApp();//launch the app again

希望能帮到你!

这篇关于如何在后台推送应用程序并在 Appium 中使用 selenium 从同一屏幕启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆