diff --git a/wlauto/workloads/gmail/com.arm.wlauto.uiauto.gmail.jar b/wlauto/workloads/gmail/com.arm.wlauto.uiauto.gmail.jar index 1ac26c16..d7392d63 100644 Binary files a/wlauto/workloads/gmail/com.arm.wlauto.uiauto.gmail.jar and b/wlauto/workloads/gmail/com.arm.wlauto.uiauto.gmail.jar differ diff --git a/wlauto/workloads/gmail/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java b/wlauto/workloads/gmail/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java index 58a0b516..74af0162 100644 --- a/wlauto/workloads/gmail/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java +++ b/wlauto/workloads/gmail/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java @@ -17,7 +17,8 @@ public class UiAutomation extends UxPerfUiAutomation { public static String TAG = "uxperf_gmail"; private Bundle parameters; - private long networkTimeout = TimeUnit.SECONDS.toMillis(20); + private int networkTimeoutSecs = 20; + private long networkTimeout = TimeUnit.SECONDS.toMillis(networkTimeoutSecs); private LinkedHashMap timingResults = new LinkedHashMap(); public void runUiAutomation() throws Exception { @@ -26,10 +27,10 @@ public class UiAutomation extends UxPerfUiAutomation { clearFirstRunDialogues(); clickNewMail(); - attachFiles(); setToField(); setSubjectField(); setComposeField(); + attachFiles(); clickSendButton(); writeResultsToFile(timingResults, parameters.getString("output_file")); @@ -61,7 +62,7 @@ public class UiAutomation extends UxPerfUiAutomation { public void setToField() throws Exception { Timer result = new Timer(); - UiObject toField = getUiObjectByDescription("To", "android.widget.TextView"); + UiObject toField = getUiObjectByText("To", "android.widget.TextView"); String recipient = parameters.getString("recipient").replace('_', ' '); result.start(); toField.setText(recipient); @@ -74,6 +75,8 @@ public class UiAutomation extends UxPerfUiAutomation { Timer result = new Timer(); UiObject subjectField = getUiObjectByText("Subject", "android.widget.EditText"); result.start(); + // Click on the subject field is required on some platforms to exit the To box cleanly + subjectField.click(); subjectField.setText("This is a test message"); getUiDevice().pressEnter(); result.end(); @@ -97,6 +100,10 @@ public class UiAutomation extends UxPerfUiAutomation { clickUiObject(sendButton, timeout); result.end(); timingResults.put("Send", result); + + UiObject drawerButton = new UiObject(new UiSelector().descriptionContains("avigat") + .className("android.widget.ImageButton")); + waitObject(drawerButton, networkTimeoutSecs); } public void attachFiles() throws Exception { diff --git a/wlauto/workloads/googlephotos/com.arm.wlauto.uiauto.googlephotos.jar b/wlauto/workloads/googlephotos/com.arm.wlauto.uiauto.googlephotos.jar index 41dd7af6..efc39efe 100644 Binary files a/wlauto/workloads/googlephotos/com.arm.wlauto.uiauto.googlephotos.jar and b/wlauto/workloads/googlephotos/com.arm.wlauto.uiauto.googlephotos.jar differ diff --git a/wlauto/workloads/googlephotos/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java b/wlauto/workloads/googlephotos/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java index a8bd6514..9f80703b 100644 --- a/wlauto/workloads/googlephotos/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java +++ b/wlauto/workloads/googlephotos/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java @@ -84,6 +84,9 @@ public class UiAutomation extends UxPerfUiAutomation { getUiObjectByResourceId("com.google.android.apps.photos:id/next_button", "android.widget.ImageView"); nextButton.clickAndWaitForNewWindow(); + + UiObject workingFolder = new UiObject(new UiSelector().text("wa-working")); + waitObject(workingFolder, viewTimeoutSecs); } private void gesturesTest() throws Exception { diff --git a/wlauto/workloads/reader/com.arm.wlauto.uiauto.reader.jar b/wlauto/workloads/reader/com.arm.wlauto.uiauto.reader.jar index ba3eb3bf..c2591d3e 100644 Binary files a/wlauto/workloads/reader/com.arm.wlauto.uiauto.reader.jar and b/wlauto/workloads/reader/com.arm.wlauto.uiauto.reader.jar differ diff --git a/wlauto/workloads/reader/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java b/wlauto/workloads/reader/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java index 5255e58e..367d7ed8 100755 --- a/wlauto/workloads/reader/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java +++ b/wlauto/workloads/reader/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java @@ -287,7 +287,7 @@ public class UiAutomation extends UxPerfUiAutomation { UiObject searchBox = getUiObjectByResourceId("android:id/search_src_text", "android.widget.EditText"); searchBox.setText(searchText); - searchBox.click(); + getUiDevice().getInstance().pressSearch(); Timer result = new Timer(); result.start(); getUiDevice().getInstance().pressEnter(); diff --git a/wlauto/workloads/skype/com.arm.wlauto.uiauto.skype.jar b/wlauto/workloads/skype/com.arm.wlauto.uiauto.skype.jar index d35b83da..467b25c9 100644 Binary files a/wlauto/workloads/skype/com.arm.wlauto.uiauto.skype.jar and b/wlauto/workloads/skype/com.arm.wlauto.uiauto.skype.jar differ diff --git a/wlauto/workloads/skype/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java b/wlauto/workloads/skype/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java index cab5ca68..aae3edcc 100644 --- a/wlauto/workloads/skype/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java +++ b/wlauto/workloads/skype/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java @@ -49,6 +49,7 @@ public class UiAutomation extends UxPerfUiAutomation { // Run tests handleLoginScreen(loginName, loginPass); + confirmLocalFileAccess(); selectContact(contactName, contactSkypeId); if ("video".equalsIgnoreCase(callType)) { videoCallTest(callDuration); @@ -76,6 +77,15 @@ public class UiAutomation extends UxPerfUiAutomation { signinButton.clickAndWaitForNewWindow(); } + private void confirmLocalFileAccess() throws Exception { + // First time run requires confirmation to allow access to local files + UiObject allowButton = new UiObject(new UiSelector().textContains("Allow") + .className("android.widget.Button")); + if (allowButton.waitForExists(timeout)) { + allowButton.clickAndWaitForNewWindow(timeout); + } + } + private void selectContact(String name, String id) throws Exception { Timer timer = new Timer(); timer.start();