我是靠谱客的博主 勤劳狗,这篇文章主要介绍UiAutomator之退出近期运行的所有APP,现在分享给大家,希望可以做个参考。

退出近期运行的所有APP应用方法:

 public void exitAllApp() throws RemoteException, UiObjectNotFoundException, InterruptedException{
UiDevice.getInstance().pressRecentApps();
UiObject recentapp = new UiObject(new UiSelector().resourceId("com.android.systemui:id/dismiss_task"));
do{
recentapp.waitForExists(2000);
if(recentapp.exists()){
recentapp.swipeLeft(5);
}
}while(recentapp.exists());
}

最后

以上就是勤劳狗最近收集整理的关于UiAutomator之退出近期运行的所有APP的全部内容,更多相关UiAutomator之退出近期运行内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(138)

评论列表共有 0 条评论

立即
投稿
返回
顶部