android.support.test.uiautomator.UiDevice#pressHome ( )源码实例Demo

下面列出了android.support.test.uiautomator.UiDevice#pressHome ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: SmoothClicker   文件: AbstractTest.java
/**
 * <i>The tests have to start from the screen home</i>
 */
@BeforeClass
public static void start(){
    l("AbstractTest","@BeforeClass start");
    UiDevice d = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
    d.pressHome();
}
 
源代码2 项目: SmoothClicker   文件: AbstractTest.java
/**
 * <i>The device should be at its initial state when all tests are done</i>
 */
@AfterClass
public static void end(){
    l("AbstractTest","@AfterClass end");
    UiDevice d = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
    d.pressHome();
}
 
源代码3 项目: AppCrawler   文件: UiHelper.java
public static void launchCrawlerApp() {
    UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
    device.pressHome();
    FileLog.i(TAG_MAIN, "{Launch} " + Config.sCrawlerPackage);
    Context context = InstrumentationRegistry.getContext();
    Intent intent = context.getPackageManager().getLaunchIntentForPackage(Config.sCrawlerPackage);
    context.startActivity(intent);
}
 
源代码4 项目: AppCrawler   文件: UiHelper.java
public static void launchHome() {
    FileLog.i(TAG_MAIN, "{Press} Home");

    UiDevice uidevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
    uidevice.pressHome();
    String launcherPackage = uidevice.getLauncherPackageName();
    uidevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)), Config.sLaunchTimeout);
}
 
源代码5 项目: OPFIab   文件: UnifiedFragmentHelperTest.java
private static void changeToHomeScreen(UiDevice uiDevice) throws InterruptedException {
    uiDevice.pressHome();
    Thread.sleep(WAIT_REOPEN_ACTIVITY);
}