1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-13 22:28:36 +00:00

Dismiss work offline banner if it appears

This commit is contained in:
muendelezaji 2016-05-31 17:07:04 +01:00
parent aaab37ba3b
commit baed3762f2
2 changed files with 9 additions and 0 deletions

View File

@ -104,6 +104,7 @@ public class UiAutomation extends UxPerfUiAutomation {
timer.end();
results.put("skip_welcome", timer);
sleep(1);
dismissWorkOfflineBanner(); // if it appears on the homescreen
}
protected void openAndCloseDrawer() throws Exception {
@ -307,6 +308,7 @@ public class UiAutomation extends UxPerfUiAutomation {
sleep(1);
getUiDevice().pressBack();
dismissWorkOfflineBanner(); // if it appears on the homescreen
deleteDocument(docName);
}
@ -386,6 +388,13 @@ public class UiAutomation extends UxPerfUiAutomation {
sleep(1);
}
public void dismissWorkOfflineBanner() throws Exception {
UiObject banner = new UiObject(new UiSelector().textContains("Work offline"));
if (banner.waitForExists(1000)) {
clickUiObject(BY_TEXT, "Got it", CLASS_BUTTON);
}
}
public void startDumpsys(String viewName) throws Exception {
if (!dumpsysEnabled)
return;