1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 20:38:57 +00:00

PCMark: Removing hard coded index to make the workload more robust

This commit is contained in:
scott 2019-05-22 10:37:18 +01:00 committed by Marc Bonnici
parent 4ce41407e9
commit e398083f6e
2 changed files with 6 additions and 6 deletions

View File

@ -104,14 +104,14 @@ public class UiAutomation extends BaseUiAutomation {
installtext.click();; installtext.click();;
} }
UiObject installed = UiObject installed =
mDevice.findObject(new UiSelector().description("RUN") mDevice.findObject(new UiSelector().text("RUN")
.className("android.view.View")); .className("android.view.View"));
installed.waitForExists(360000); installed.waitForExists(180000);
if (!installed.exists()){ if (!installed.exists()){
UiObject installedtext = UiObject installeddesc =
mDevice.findObject(new UiSelector().text("RUN") mDevice.findObject(new UiSelector().description("RUN")
.className("android.view.View")); .className("android.view.View"));
installedtext.waitForExists(1000); installeddesc.waitForExists(1000);
} }
} }
@ -120,7 +120,7 @@ public class UiAutomation extends BaseUiAutomation {
UiObject run = UiObject run =
mDevice.findObject(new UiSelector().resourceId("CONTROL_PCMA_WORK_V2_DEFAULT") mDevice.findObject(new UiSelector().resourceId("CONTROL_PCMA_WORK_V2_DEFAULT")
.className("android.view.View") .className("android.view.View")
.childSelector(new UiSelector().index(1) .childSelector(new UiSelector().text("RUN")
.className("android.view.View"))); .className("android.view.View")));
if (run.exists()) { if (run.exists()) {
run.click(); run.click();