退出近期运行的所有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之退出近期运行内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复