1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-04-30 06:25:20 +01:00

Googleslides: Add workaround for opening navigation drawer

On Android N running under the instrumentation uiautomator appears to have
trouble retrieving the root node for the home screen of google slides. Therefore
we open the navigation drawer via a swipe which allows the node to be found again.
This commit is contained in:
Marc Bonnici 2017-05-26 10:39:14 +01:00
parent 89aa3e1208
commit a7ed00d9ed
2 changed files with 4 additions and 1 deletions
wlauto/workloads/googleslides
com.arm.wlauto.uiauto.googleslides.uiautoapk
uiauto/app/src/main/java/com/arm/wlauto/uiauto/googleslides

@ -308,7 +308,10 @@ public class UiAutomation extends UxPerfUiAutomation {
ActionLogger logger = new ActionLogger(testTag, parameters); ActionLogger logger = new ActionLogger(testTag, parameters);
logger.start(); logger.start();
clickUiObject(BY_DESC, "Open navigation drawer"); // Work around to open navigation drawer via swipe.
uiDeviceSwipeHorizontal(0, getDisplayCentreWidth(), getDisplayCentreHeight() / 2, 10);
// clickUiObject(BY_DESC, "Open navigation drawer");
clickUiObject(BY_TEXT, "Settings", true); clickUiObject(BY_TEXT, "Settings", true);
clickUiObject(BY_TEXT, "Create PowerPoint"); clickUiObject(BY_TEXT, "Create PowerPoint");
mDevice.pressBack(); mDevice.pressBack();