1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 02:41:11 +01:00

Antutu: Updating to handle the new shortcut popup

Added logic to dismiss the new popup message which asks
to add a shortcut to the android homescreen.
This commit is contained in:
Scott Jackson 2019-09-19 11:05:47 +00:00 committed by Marc Bonnici
parent 6beac11ee2
commit 35ce87068c
2 changed files with 11 additions and 1 deletions

View File

@ -44,7 +44,8 @@ public class UiAutomation extends BaseUiAutomation {
@Test @Test
public void setup() throws Exception { public void setup() throws Exception {
dismissAndroidVersionPopup(); dismissAndroidVersionPopup();
clearPopups();
} }
@Test @Test
@ -65,6 +66,15 @@ public class UiAutomation extends BaseUiAutomation {
sleep(1); sleep(1);
} }
public void clearPopups() throws Exception {
UiObject cancel =
mDevice.findObject(new UiSelector().textContains("CANCEL"));
cancel.waitForExists(5000);
if (cancel.exists()){
cancel.click();
}
}
public void waitforCompletion() throws Exception { public void waitforCompletion() throws Exception {
UiObject totalScore = UiObject totalScore =
mDevice.findObject(new UiSelector().resourceId("com.antutu.ABenchMark:id/textViewTotalScore")); mDevice.findObject(new UiSelector().resourceId("com.antutu.ABenchMark:id/textViewTotalScore"));