mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +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:
parent
6d72a242ce
commit
8c7320a1be
Binary file not shown.
@ -57,6 +57,12 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
setScreenOrientation(ScreenOrientation.NATURAL);
|
setScreenOrientation(ScreenOrientation.NATURAL);
|
||||||
clearFirstRun();
|
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
|
//Calculate the location of the test selection button
|
||||||
UiObject circle =
|
UiObject circle =
|
||||||
mDevice.findObject(new UiSelector().resourceId(packageID + "main_circleControl")
|
mDevice.findObject(new UiSelector().resourceId(packageID + "main_circleControl")
|
||||||
@ -122,7 +128,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UiObject home =
|
UiObject home =
|
||||||
mDevice.findObject(new UiSelector().resourceId(packageID + "main_homeBack")
|
mDevice.findObject(new UiSelector().resourceId(packageID + "main_view_back")
|
||||||
.className("android.widget.LinearLayout"));
|
.className("android.widget.LinearLayout"));
|
||||||
home.waitForExists(300000);
|
home.waitForExists(300000);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user