mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-15 23:30:47 +01:00
Fix pcmark setup
* Pcmark sometimes auto installs without need for clicking button, in such cases workload throws UiObjectNotFound exception. * Added logic to check for installation button existence. * Increased install wait time to 5 mins.
This commit is contained in:
parent
dce07e5095
commit
16be8a70f5
Binary file not shown.
@ -107,33 +107,40 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
} else {
|
} else {
|
||||||
UiObject benchmarktext =
|
UiObject benchmarktext =
|
||||||
mDevice.findObject(new UiSelector().textContains("INSTALL("));
|
mDevice.findObject(new UiSelector().textContains("INSTALL("));
|
||||||
benchmarktext.click();
|
if(benchmarktext.exists()) {
|
||||||
|
benchmarktext.click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
UiObject install =
|
|
||||||
mDevice.findObject(new UiSelector().description("INSTALL")
|
UiObject install =
|
||||||
|
mDevice.findObject(new UiSelector().description("INSTALL")
|
||||||
|
.className("android.view.View"));
|
||||||
|
if (install.exists()) {
|
||||||
|
install.click();
|
||||||
|
} else {
|
||||||
|
UiObject installtext =
|
||||||
|
mDevice.findObject(new UiSelector().text("INSTALL")
|
||||||
|
.className("android.view.View"));
|
||||||
|
if (installtext.exists()) {
|
||||||
|
installtext.click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UiObject installed =
|
||||||
|
mDevice.findObject(new UiSelector().text("RUN")
|
||||||
.className("android.view.View"));
|
.className("android.view.View"));
|
||||||
if (install.exists()) {
|
installed.waitForExists(360000);
|
||||||
install.click();
|
if (!installed.exists()){
|
||||||
} else {
|
UiObject installeddesc =
|
||||||
UiObject installtext =
|
mDevice.findObject(new UiSelector().description("RUN")
|
||||||
mDevice.findObject(new UiSelector().text("INSTALL")
|
.className("android.view.View"));
|
||||||
.className("android.view.View"));
|
|
||||||
installtext.click();;
|
|
||||||
}
|
|
||||||
UiObject installed =
|
|
||||||
mDevice.findObject(new UiSelector().text("RUN")
|
|
||||||
.className("android.view.View"));
|
|
||||||
installed.waitForExists(180000);
|
|
||||||
if (!installed.exists()){
|
|
||||||
UiObject installeddesc =
|
|
||||||
mDevice.findObject(new UiSelector().description("RUN")
|
|
||||||
.className("android.view.View"));
|
|
||||||
installeddesc.waitForExists(1000);
|
installeddesc.waitForExists(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Execute the Work 2.0 Performance Benchmark - wait up to ten minutes for this to complete
|
//Execute the Work 2.0 Performance Benchmark - wait up to ten minutes for this to complete
|
||||||
private void runBenchmark() throws Exception {
|
private void runBenchmark() throws Exception {
|
||||||
|
// After installing, stop screen switching back to landscape.
|
||||||
|
setScreenOrientation(ScreenOrientation.PORTRAIT);
|
||||||
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")
|
||||||
@ -144,7 +151,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
} else {
|
} else {
|
||||||
UiObject runtext =
|
UiObject runtext =
|
||||||
mDevice.findObject(new UiSelector().text("RUN"));
|
mDevice.findObject(new UiSelector().text("RUN"));
|
||||||
if (runtext.exists()) {
|
if (runtext.waitForExists(2000)) {
|
||||||
runtext.click();
|
runtext.click();
|
||||||
} else {
|
} else {
|
||||||
UiObject rundesc =
|
UiObject rundesc =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user