mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-21 02:00:49 +01:00
antutu: fixing multi-times playback for v5
"times" parameter didn't work properly for version 5 because an extra back button press was required due to UI changes from previous versions. This commit adds the button press.
This commit is contained in:
parent
2f1c7300d4
commit
09d0736d3b
Binary file not shown.
@ -68,7 +68,8 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
if (iteration >= times) {
|
if (iteration >= times) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
returnToTestScreen();
|
returnToTestScreen(version);
|
||||||
|
dismissRateDialogIfNecessary();
|
||||||
}
|
}
|
||||||
} else { // version earlier than 4.0.3
|
} else { // version earlier than 4.0.3
|
||||||
dismissReleaseNotesDialogIfNecessary();
|
dismissReleaseNotesDialogIfNecessary();
|
||||||
@ -107,6 +108,17 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean dismissRateDialogIfNecessary() throws Exception {
|
||||||
|
UiSelector selector = new UiSelector();
|
||||||
|
UiObject closeButton = new UiObject(selector.text("NOT NOW"));
|
||||||
|
if (closeButton.waitForExists(TimeUnit.SECONDS.toMillis(initialTimeoutSeconds))) {
|
||||||
|
closeButton.click();
|
||||||
|
sleep(1); // diaglog dismissal
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
public void hitTestButton() throws Exception {
|
public void hitTestButton() throws Exception {
|
||||||
UiSelector selector = new UiSelector();
|
UiSelector selector = new UiSelector();
|
||||||
UiObject test = new UiObject(selector.text("Test")
|
UiObject test = new UiObject(selector.text("Test")
|
||||||
@ -236,7 +248,9 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void returnToTestScreen() throws Exception {
|
public void returnToTestScreen(String version) throws Exception {
|
||||||
|
getUiDevice().pressBack();
|
||||||
|
if (version.equals("5.3.0"))
|
||||||
getUiDevice().pressBack();
|
getUiDevice().pressBack();
|
||||||
UiSelector selector = new UiSelector();
|
UiSelector selector = new UiSelector();
|
||||||
UiObject retestButton = new UiObject(selector.text("Test Again")
|
UiObject retestButton = new UiObject(selector.text("Test Again")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user