1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-02 11:22:41 +01:00

workloads/uiauto: Update workloads to dismiss android version warning

Update workloads that use uiautomator and can display a warning about
using an old version of the app to dismiss the popup if present.
This commit is contained in:
Marc Bonnici
2018-10-24 09:17:48 +01:00
committed by setrofim
parent 7632ee8288
commit dead312ff7
12 changed files with 18 additions and 24 deletions

View File

@@ -46,7 +46,7 @@ public class UiAutomation extends BaseUiAutomation {
@Test
public void setup() throws Exception{
dismissPopup();
dismissAndroidVersionPopup();
setScreenOrientation(ScreenOrientation.NATURAL);
loadBenchmarks();
installBenchmark();
@@ -62,18 +62,6 @@ public class UiAutomation extends BaseUiAutomation {
unsetScreenOrientation();
}
// If we run the app in newer Android we'll get a popup complaining about
// that, silently accept it and carry on.
// This function should act as a NOP if no popup appears.
public void dismissPopup() throws Exception {
UiObject acceptButton =
mDevice.findObject(new UiSelector().resourceId("android:id/button1")
.className("android.widget.Button"));
if (acceptButton.waitForExists(WAIT_TIMEOUT_5SEC)) {
acceptButton.click();
}
}
//Swipe to benchmarks and back to initialise the app correctly
private void loadBenchmarks() throws Exception {
UiObject title =