1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

workloads/gfxbench: Swtich to the home screen before run

Alter the element to check popups have closed to be present
on any main screen and ensure we switch to the homescreen of the
app before performing setup steps.
This commit is contained in:
Marc Bonnici 2020-06-30 13:45:57 +01:00 committed by setrofim
parent 6d72a242ce
commit 8c7320a1be
2 changed files with 7 additions and 1 deletions

View File

@ -57,6 +57,12 @@ public class UiAutomation extends BaseUiAutomation {
setScreenOrientation(ScreenOrientation.NATURAL);
clearFirstRun();
// Ensure we're on the home screen
UiObject homeButton = mDevice.findObject(
new UiSelector().resourceId(packageID + "tabbar_back"))
.getChild(new UiSelector().index(0));
homeButton.click();
//Calculate the location of the test selection button
UiObject circle =
mDevice.findObject(new UiSelector().resourceId(packageID + "main_circleControl")
@ -122,7 +128,7 @@ public class UiAutomation extends BaseUiAutomation {
}
UiObject home =
mDevice.findObject(new UiSelector().resourceId(packageID + "main_homeBack")
mDevice.findObject(new UiSelector().resourceId(packageID + "main_view_back")
.className("android.widget.LinearLayout"));
home.waitForExists(300000);
}