public static void reload() { if (DeviceHelper.isTablet()) { sToolbar.pressReloadButton(); // Waits for page load & asserts isNotEditing. return; } sToolbar.assertIsNotEditing(); WaitHelper.waitForPageLoad( new Runnable() { @Override public void run() { sAppMenu.pressMenuItem(AppMenuComponent.MenuItem.RELOAD); } }); }
public static void goBack() { if (DeviceHelper.isTablet()) { sToolbar.pressBackButton(); // Waits for page load & asserts isNotEditing. return; } sToolbar.assertIsNotEditing(); WaitHelper.waitForPageLoad( new Runnable() { @Override public void run() { // TODO: Lower soft keyboard first if applicable. Note that // Solo.hideSoftKeyboard() does not clear focus (which might be fine since // Gecko would be the element focused). sSolo.goBack(); } }); }