Skip to content

Commit 8c7320a

Browse files
marcbonnicisetrofim
authored andcommitted
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.
1 parent 6d72a24 commit 8c7320a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
18 Bytes
Binary file not shown.

wa/workloads/gfxbench/uiauto/app/src/main/java/com/arm/wa/uiauto/gfxbench/UiAutomation.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ public void setup() throws Exception{
5757
setScreenOrientation(ScreenOrientation.NATURAL);
5858
clearFirstRun();
5959

60+
// Ensure we're on the home screen
61+
UiObject homeButton = mDevice.findObject(
62+
new UiSelector().resourceId(packageID + "tabbar_back"))
63+
.getChild(new UiSelector().index(0));
64+
homeButton.click();
65+
6066
//Calculate the location of the test selection button
6167
UiObject circle =
6268
mDevice.findObject(new UiSelector().resourceId(packageID + "main_circleControl")
@@ -122,7 +128,7 @@ public void clearFirstRun() throws Exception {
122128
}
123129

124130
UiObject home =
125-
mDevice.findObject(new UiSelector().resourceId(packageID + "main_homeBack")
131+
mDevice.findObject(new UiSelector().resourceId(packageID + "main_view_back")
126132
.className("android.widget.LinearLayout"));
127133
home.waitForExists(300000);
128134
}

0 commit comments

Comments
 (0)