package com.yang.clicktest;
import com.android.uiautomator.core.UiDevice;
import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.core.UiSelector;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
import android.os.RemoteException;
public class UiClickTest4 extends UiAutomatorTestCase {
public void test() 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());
}
}
import com.android.uiautomator.core.UiDevice;
import com.android.uiautomator.core.UiObject;
import com.android.uiautomator.core.UiObjectNotFoundException;
import com.android.uiautomator.core.UiSelector;
import com.android.uiautomator.testrunner.UiAutomatorTestCase;
import android.os.RemoteException;
public class UiClickTest4 extends UiAutomatorTestCase {
public void test() 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());
}
}