mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-03-20 17:48:44 +00:00
Fixes for Reader/Gmail/Skype
Yet more subtle changes to allow them to run on more devices.
This commit is contained in:
parent
26443f66cc
commit
92e4d41f69
Binary file not shown.
@ -37,12 +37,17 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearFirstRunDialogues () throws Exception {
|
public void clearFirstRunDialogues () throws Exception {
|
||||||
// Enter search text into the file searchBox. This will automatically filter the list.
|
// The first run dialogues vary on different devices so check if they are there and dismiss
|
||||||
UiObject gotItBox = getUiObjectByResourceId("com.google.android.gm:id/welcome_tour_got_it",
|
UiObject gotItBox = new UiObject(new UiSelector().resourceId("com.google.android.gm:id/welcome_tour_got_it")
|
||||||
"android.widget.TextView");
|
.className("android.widget.TextView"));
|
||||||
clickUiObject(gotItBox, timeout);
|
if (gotItBox.exists()) {
|
||||||
UiObject takeMeToBox = getUiObjectByText("Take me to Gmail", "android.widget.TextView");
|
clickUiObject(gotItBox, timeout);
|
||||||
clickUiObject(takeMeToBox, timeout);
|
}
|
||||||
|
UiObject takeMeToBox = new UiObject(new UiSelector().textContains("Take me to Gmail")
|
||||||
|
.className("android.widget.TextView"));
|
||||||
|
if (takeMeToBox.exists()) {
|
||||||
|
clickUiObject(takeMeToBox, timeout);
|
||||||
|
}
|
||||||
UiObject converationView = new UiObject(new UiSelector()
|
UiObject converationView = new UiObject(new UiSelector()
|
||||||
.resourceId("com.google.android.gm:id/conversation_list_view")
|
.resourceId("com.google.android.gm:id/conversation_list_view")
|
||||||
.className("android.widget.ListView"));
|
.className("android.widget.ListView"));
|
||||||
|
Binary file not shown.
@ -139,6 +139,8 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
String file = filename.replaceAll("\\.", "_").replaceAll("\\s+", "_");
|
String file = filename.replaceAll("\\.", "_").replaceAll("\\s+", "_");
|
||||||
|
|
||||||
timingResults.put(String.format(TestTag + "_" + "selectLocalFilesList" + "_" + file), selectLocalFilesList());
|
timingResults.put(String.format(TestTag + "_" + "selectLocalFilesList" + "_" + file), selectLocalFilesList());
|
||||||
|
// On some devices permissions to access local files occurs here rather than the earlier step
|
||||||
|
confirmLocalFileAccess();
|
||||||
timingResults.put(String.format(TestTag + "_" + "selectSearchDuration" + "_" + file), selectSearchFileButton());
|
timingResults.put(String.format(TestTag + "_" + "selectSearchDuration" + "_" + file), selectSearchFileButton());
|
||||||
timingResults.put(String.format(TestTag + "_" + "searchFileList" + "_" + file), searchFileList(filename));
|
timingResults.put(String.format(TestTag + "_" + "searchFileList" + "_" + file), searchFileList(filename));
|
||||||
timingResults.put(String.format(TestTag + "_" + "openFileFromList" + "_" + file), openFileFromList(filename));
|
timingResults.put(String.format(TestTag + "_" + "openFileFromList" + "_" + file), openFileFromList(filename));
|
||||||
|
Binary file not shown.
@ -49,7 +49,7 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
|
|
||||||
// Run tests
|
// Run tests
|
||||||
handleLoginScreen(loginName, loginPass);
|
handleLoginScreen(loginName, loginPass);
|
||||||
confirmLocalFileAccess();
|
confirmAccess();
|
||||||
selectContact(contactName, contactSkypeId);
|
selectContact(contactName, contactSkypeId);
|
||||||
if ("video".equalsIgnoreCase(callType)) {
|
if ("video".equalsIgnoreCase(callType)) {
|
||||||
videoCallTest(callDuration);
|
videoCallTest(callDuration);
|
||||||
@ -77,11 +77,12 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
signinButton.clickAndWaitForNewWindow();
|
signinButton.clickAndWaitForNewWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void confirmLocalFileAccess() throws Exception {
|
private void confirmAccess() throws Exception {
|
||||||
// First time run requires confirmation to allow access to local files
|
// First time run requires confirmation to allow access to local files
|
||||||
UiObject allowButton = new UiObject(new UiSelector().textContains("Allow")
|
UiObject allowButton = new UiObject(new UiSelector().textContains("Allow")
|
||||||
.className("android.widget.Button"));
|
.className("android.widget.Button"));
|
||||||
if (allowButton.waitForExists(timeout)) {
|
// Some devices request multiple permisson rights so clear them all here
|
||||||
|
while (allowButton.waitForExists(timeout)) {
|
||||||
allowButton.clickAndWaitForNewWindow(timeout);
|
allowButton.clickAndWaitForNewWindow(timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user