mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +00:00
Googleplaybooks: Adding support for night reading dialogues.
Certain devices present a night time reading popup alert when opening the books workload. This can throw off the workload so I've added a function to check for this and dismiss if neccessary.
This commit is contained in:
parent
2cb1f47e11
commit
503005ba5f
Binary file not shown.
@ -617,6 +617,8 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
|
||||
// becomes visible on the screen. Therefore add pause instead.
|
||||
sleep(3);
|
||||
|
||||
dismissNightLight();
|
||||
|
||||
if (!activityReader.waitForExists(viewTimeout)) {
|
||||
throw new UiObjectNotFoundException("Could not find \"activity reader view\".");
|
||||
}
|
||||
@ -692,4 +694,12 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
private void dismissNightLight() throws Exception {
|
||||
UiObject night =
|
||||
mDevice.findObject(new UiSelector().text("Night Light makes reading easy"));
|
||||
if (night.exists()) {
|
||||
clickUiObject(BY_TEXT, "DISMISS");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user