mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +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();
|
waitForVersion4Results();
|
||||||
viewDetails();
|
viewDetails();
|
||||||
extractResults();
|
extractResults();
|
||||||
|
|
||||||
iteration++;
|
iteration++;
|
||||||
if (iteration >= times) {
|
if (iteration >= times) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
returnToTestScreen(version);
|
returnToTestScreen(version);
|
||||||
dismissRateDialogIfNecessary();
|
dismissRateDialogIfNecessary();
|
||||||
|
testAgain();
|
||||||
}
|
}
|
||||||
} else { // version earlier than 4.0.3
|
} else { // version earlier than 4.0.3
|
||||||
dismissReleaseNotesDialogIfNecessary();
|
dismissReleaseNotesDialogIfNecessary();
|
||||||
@ -111,7 +114,7 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
public boolean dismissRateDialogIfNecessary() throws Exception {
|
public boolean dismissRateDialogIfNecessary() throws Exception {
|
||||||
UiSelector selector = new UiSelector();
|
UiSelector selector = new UiSelector();
|
||||||
UiObject closeButton = new UiObject(selector.text("NOT NOW"));
|
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();
|
closeButton.click();
|
||||||
sleep(1); // diaglog dismissal
|
sleep(1); // diaglog dismissal
|
||||||
return true;
|
return true;
|
||||||
@ -139,8 +142,6 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
sleep(1); // possible tab transtion
|
sleep(1); // possible tab transtion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void hitTest() throws Exception {
|
public void hitTest() throws Exception {
|
||||||
UiSelector selector = new UiSelector();
|
UiSelector selector = new UiSelector();
|
||||||
UiObject test = new UiObject(selector.text("Test"));
|
UiObject test = new UiObject(selector.text("Test"));
|
||||||
@ -252,6 +253,9 @@ public class UiAutomation extends BaseUiAutomation {
|
|||||||
getUiDevice().pressBack();
|
getUiDevice().pressBack();
|
||||||
if (version.equals("5.3.0"))
|
if (version.equals("5.3.0"))
|
||||||
getUiDevice().pressBack();
|
getUiDevice().pressBack();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAgain() throws Exception {
|
||||||
UiSelector selector = new UiSelector();
|
UiSelector selector = new UiSelector();
|
||||||
UiObject retestButton = new UiObject(selector.text("Test Again")
|
UiObject retestButton = new UiObject(selector.text("Test Again")
|
||||||
.className("android.widget.Button"));
|
.className("android.widget.Button"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user