mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
antutu: multi-times playback fix [part 2]
A "please rate me" dialog occasionally pops but when returning to the initial screen (when re-running the test). The check to dismiss it wasn't being done at the right time, so it was still preventing mutli-times execution. This commit resolves that issue.
This commit is contained in:
parent
7a86a1b17f
commit
67ad4a63e4
Binary file not shown.
@ -64,12 +64,15 @@ public class UiAutomation extends BaseUiAutomation {
|
||||
waitForVersion4Results();
|
||||
viewDetails();
|
||||
extractResults();
|
||||
|
||||
iteration++;
|
||||
if (iteration >= times) {
|
||||
break;
|
||||
}
|
||||
|
||||
returnToTestScreen(version);
|
||||
dismissRateDialogIfNecessary();
|
||||
testAgain();
|
||||
}
|
||||
} else { // version earlier than 4.0.3
|
||||
dismissReleaseNotesDialogIfNecessary();
|
||||
@ -111,7 +114,7 @@ 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))) {
|
||||
if (closeButton.waitForExists(1)) { // dialog should already be there.
|
||||
closeButton.click();
|
||||
sleep(1); // diaglog dismissal
|
||||
return true;
|
||||
@ -139,8 +142,6 @@ public class UiAutomation extends BaseUiAutomation {
|
||||
sleep(1); // possible tab transtion
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void hitTest() throws Exception {
|
||||
UiSelector selector = new UiSelector();
|
||||
UiObject test = new UiObject(selector.text("Test"));
|
||||
@ -252,6 +253,9 @@ public class UiAutomation extends BaseUiAutomation {
|
||||
getUiDevice().pressBack();
|
||||
if (version.equals("5.3.0"))
|
||||
getUiDevice().pressBack();
|
||||
}
|
||||
|
||||
public void testAgain() throws Exception {
|
||||
UiSelector selector = new UiSelector();
|
||||
UiObject retestButton = new UiObject(selector.text("Test Again")
|
||||
.className("android.widget.Button"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user