diff --git a/wa/framework/uiauto/app/src/main/java/com/arm/wa/uiauto/BaseUiAutomation.java b/wa/framework/uiauto/app/src/main/java/com/arm/wa/uiauto/BaseUiAutomation.java index 962bea2a..d8e38345 100644 --- a/wa/framework/uiauto/app/src/main/java/com/arm/wa/uiauto/BaseUiAutomation.java +++ b/wa/framework/uiauto/app/src/main/java/com/arm/wa/uiauto/BaseUiAutomation.java @@ -573,9 +573,29 @@ public class BaseUiAutomation { } } + + // If an an app is not designed for running on the latest version of android + // (currently Q) an additional screen can popup asking to confirm permissions. + public void dismissAndroidPermissionPopup() throws Exception { + UiObject permissionAccess = + mDevice.findObject(new UiSelector().textMatches( + ".*Choose what to allow .* to access")); + UiObject continueButton = + mDevice.findObject(new UiSelector().resourceId("com.android.permissioncontroller:id/continue_button") + .textContains("Continue")); + if (permissionAccess.exists() && continueButton.exists()) { + continueButton.click(); + } + } + + // If an an app is not designed for running on the latest version of android // (currently Q) dissmiss the warning popup if present. public void dismissAndroidVersionPopup() throws Exception { + + // Ensure we have dissmied any permission screens before looking for the version popup + dismissAndroidPermissionPopup(); + UiObject warningText = mDevice.findObject(new UiSelector().textContains( "This app was built for an older version of Android")); @@ -586,7 +606,8 @@ public class BaseUiAutomation { acceptButton.click(); } } - + + // If Chrome is a fresh install then these popups may be presented // dismiss them if visible. public void dismissChromePopup() throws Exception { @@ -600,7 +621,7 @@ public class BaseUiAutomation { .className("android.widget.Button")); if (negative.waitForExists(10000)) { negative.click(); - } + } } UiObject lite = mDevice.findObject(new UiSelector().resourceId("com.android.chrome:id/button_secondary") diff --git a/wa/framework/uiauto/uiauto.aar b/wa/framework/uiauto/uiauto.aar index 82aa86a9..9aaa3742 100644 Binary files a/wa/framework/uiauto/uiauto.aar and b/wa/framework/uiauto/uiauto.aar differ diff --git a/wa/workloads/adobereader/com.arm.wa.uiauto.adobereader.apk b/wa/workloads/adobereader/com.arm.wa.uiauto.adobereader.apk index e30a9ccd..7e42f255 100644 Binary files a/wa/workloads/adobereader/com.arm.wa.uiauto.adobereader.apk and b/wa/workloads/adobereader/com.arm.wa.uiauto.adobereader.apk differ diff --git a/wa/workloads/aitutu/com.arm.wa.uiauto.aitutu.apk b/wa/workloads/aitutu/com.arm.wa.uiauto.aitutu.apk index e226484a..2f42b125 100644 Binary files a/wa/workloads/aitutu/com.arm.wa.uiauto.aitutu.apk and b/wa/workloads/aitutu/com.arm.wa.uiauto.aitutu.apk differ diff --git a/wa/workloads/androbench/com.arm.wa.uiauto.androbench.apk b/wa/workloads/androbench/com.arm.wa.uiauto.androbench.apk index 2da28e29..00e353c5 100644 Binary files a/wa/workloads/androbench/com.arm.wa.uiauto.androbench.apk and b/wa/workloads/androbench/com.arm.wa.uiauto.androbench.apk differ diff --git a/wa/workloads/antutu/com.arm.wa.uiauto.antutu.apk b/wa/workloads/antutu/com.arm.wa.uiauto.antutu.apk index ae4ef353..db6bbe49 100644 Binary files a/wa/workloads/antutu/com.arm.wa.uiauto.antutu.apk and b/wa/workloads/antutu/com.arm.wa.uiauto.antutu.apk differ diff --git a/wa/workloads/applaunch/com.arm.wa.uiauto.applaunch.apk b/wa/workloads/applaunch/com.arm.wa.uiauto.applaunch.apk index 1461aaca..5e179125 100644 Binary files a/wa/workloads/applaunch/com.arm.wa.uiauto.applaunch.apk and b/wa/workloads/applaunch/com.arm.wa.uiauto.applaunch.apk differ diff --git a/wa/workloads/benchmarkpi/com.arm.wa.uiauto.benchmarkpi.apk b/wa/workloads/benchmarkpi/com.arm.wa.uiauto.benchmarkpi.apk index 80318923..78f15ac3 100644 Binary files a/wa/workloads/benchmarkpi/com.arm.wa.uiauto.benchmarkpi.apk and b/wa/workloads/benchmarkpi/com.arm.wa.uiauto.benchmarkpi.apk differ diff --git a/wa/workloads/chrome/com.arm.wa.uiauto.chrome.apk b/wa/workloads/chrome/com.arm.wa.uiauto.chrome.apk index 2ffe48bc..0fe0b566 100644 Binary files a/wa/workloads/chrome/com.arm.wa.uiauto.chrome.apk and b/wa/workloads/chrome/com.arm.wa.uiauto.chrome.apk differ diff --git a/wa/workloads/geekbench/com.arm.wa.uiauto.geekbench.apk b/wa/workloads/geekbench/com.arm.wa.uiauto.geekbench.apk index 1f9eaea9..eaccba92 100644 Binary files a/wa/workloads/geekbench/com.arm.wa.uiauto.geekbench.apk and b/wa/workloads/geekbench/com.arm.wa.uiauto.geekbench.apk differ diff --git a/wa/workloads/gfxbench/com.arm.wa.uiauto.gfxbench.apk b/wa/workloads/gfxbench/com.arm.wa.uiauto.gfxbench.apk index 97be4f51..2d92a9a5 100755 Binary files a/wa/workloads/gfxbench/com.arm.wa.uiauto.gfxbench.apk and b/wa/workloads/gfxbench/com.arm.wa.uiauto.gfxbench.apk differ diff --git a/wa/workloads/glbenchmark/com.arm.wa.uiauto.glbenchmark.apk b/wa/workloads/glbenchmark/com.arm.wa.uiauto.glbenchmark.apk index e6334ace..b6662e60 100644 Binary files a/wa/workloads/glbenchmark/com.arm.wa.uiauto.glbenchmark.apk and b/wa/workloads/glbenchmark/com.arm.wa.uiauto.glbenchmark.apk differ diff --git a/wa/workloads/gmail/com.arm.wa.uiauto.gmail.apk b/wa/workloads/gmail/com.arm.wa.uiauto.gmail.apk index 126159ca..649096b4 100644 Binary files a/wa/workloads/gmail/com.arm.wa.uiauto.gmail.apk and b/wa/workloads/gmail/com.arm.wa.uiauto.gmail.apk differ diff --git a/wa/workloads/googlemaps/com.arm.wa.uiauto.googlemaps.apk b/wa/workloads/googlemaps/com.arm.wa.uiauto.googlemaps.apk index 9d5e00ae..7846ce8d 100644 Binary files a/wa/workloads/googlemaps/com.arm.wa.uiauto.googlemaps.apk and b/wa/workloads/googlemaps/com.arm.wa.uiauto.googlemaps.apk differ diff --git a/wa/workloads/googlephotos/com.arm.wa.uiauto.googlephotos.apk b/wa/workloads/googlephotos/com.arm.wa.uiauto.googlephotos.apk index 90de078c..23c7eef6 100644 Binary files a/wa/workloads/googlephotos/com.arm.wa.uiauto.googlephotos.apk and b/wa/workloads/googlephotos/com.arm.wa.uiauto.googlephotos.apk differ diff --git a/wa/workloads/googleplaybooks/com.arm.wa.uiauto.googleplaybooks.apk b/wa/workloads/googleplaybooks/com.arm.wa.uiauto.googleplaybooks.apk index 6fe4d37f..85d63c54 100644 Binary files a/wa/workloads/googleplaybooks/com.arm.wa.uiauto.googleplaybooks.apk and b/wa/workloads/googleplaybooks/com.arm.wa.uiauto.googleplaybooks.apk differ diff --git a/wa/workloads/googleslides/com.arm.wa.uiauto.googleslides.apk b/wa/workloads/googleslides/com.arm.wa.uiauto.googleslides.apk index 8d5db61d..a5f173f4 100644 Binary files a/wa/workloads/googleslides/com.arm.wa.uiauto.googleslides.apk and b/wa/workloads/googleslides/com.arm.wa.uiauto.googleslides.apk differ diff --git a/wa/workloads/motionmark/com.arm.wa.uiauto.motionmark.apk b/wa/workloads/motionmark/com.arm.wa.uiauto.motionmark.apk index 35faea4e..480a54f8 100644 Binary files a/wa/workloads/motionmark/com.arm.wa.uiauto.motionmark.apk and b/wa/workloads/motionmark/com.arm.wa.uiauto.motionmark.apk differ diff --git a/wa/workloads/pcmark/com.arm.wa.uiauto.pcmark.apk b/wa/workloads/pcmark/com.arm.wa.uiauto.pcmark.apk index 66ba8bb6..4ee1fe08 100644 Binary files a/wa/workloads/pcmark/com.arm.wa.uiauto.pcmark.apk and b/wa/workloads/pcmark/com.arm.wa.uiauto.pcmark.apk differ diff --git a/wa/workloads/vellamo/com.arm.wa.uiauto.vellamo.apk b/wa/workloads/vellamo/com.arm.wa.uiauto.vellamo.apk index 11654a61..806a25ca 100644 Binary files a/wa/workloads/vellamo/com.arm.wa.uiauto.vellamo.apk and b/wa/workloads/vellamo/com.arm.wa.uiauto.vellamo.apk differ diff --git a/wa/workloads/youtube/com.arm.wa.uiauto.youtube.apk b/wa/workloads/youtube/com.arm.wa.uiauto.youtube.apk index 313e5dde..ba937a46 100644 Binary files a/wa/workloads/youtube/com.arm.wa.uiauto.youtube.apk and b/wa/workloads/youtube/com.arm.wa.uiauto.youtube.apk differ