use of android.support.test.uiautomator.UiObject in project android_frameworks_base by AOSPA.
the class DirectoryListBot method openDocument.
public void openDocument(String label) throws UiObjectNotFoundException {
int toolType = Configurator.getInstance().getToolType();
Configurator.getInstance().setToolType(MotionEvent.TOOL_TYPE_FINGER);
UiObject doc = findDocument(label);
doc.click();
Configurator.getInstance().setToolType(toolType);
}
use of android.support.test.uiautomator.UiObject in project android_frameworks_base by AOSPA.
the class UiBot method openSearchView.
public void openSearchView() throws UiObjectNotFoundException {
UiObject searchView = findSearchView();
searchView.click();
assertTrue(searchView.exists());
}
use of android.support.test.uiautomator.UiObject in project android_frameworks_base by AOSPA.
the class UiBot method openOverflowMenu.
public UiObject openOverflowMenu() throws UiObjectNotFoundException {
UiObject obj = findMenuMoreOptions();
obj.click();
mDevice.waitForIdle(mTimeout);
return obj;
}
use of android.support.test.uiautomator.UiObject in project android_frameworks_base by crdroidandroid.
the class FilesActivityUiTest method testDownload_RetryUnsuccessful.
@Suppress
public void testDownload_RetryUnsuccessful() throws Exception {
DownloadManager dm = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
// This downloads fails! But it'll still show up.
dm.enqueue(new Request(Uri.parse("http://www.google.com/hamfancy")));
bots.roots.openRoot("Downloads");
UiObject doc = bots.directory.findDocument("Unsuccessful");
doc.waitForExists(TIMEOUT);
int toolType = Configurator.getInstance().getToolType();
Configurator.getInstance().setToolType(MotionEvent.TOOL_TYPE_FINGER);
doc.click();
Configurator.getInstance().setToolType(toolType);
assertTrue(bots.main.findDownloadRetryDialog().exists());
// to clear the dialog.
device.pressBack();
}
use of android.support.test.uiautomator.UiObject in project android_frameworks_base by crdroidandroid.
the class DirectoryListBot method selectDocument.
public UiObject selectDocument(String label) throws UiObjectNotFoundException {
UiObject doc = findDocument(label);
doc.longClick();
return doc;
}
Aggregations