diff --git a/wlauto/common/android/BaseUiAutomation.class b/wlauto/common/android/BaseUiAutomation.class index 835672fb..822000ec 100644 Binary files a/wlauto/common/android/BaseUiAutomation.class and b/wlauto/common/android/BaseUiAutomation.class differ diff --git a/wlauto/external/uiauto/src/com/arm/wlauto/uiauto/BaseUiAutomation.java b/wlauto/external/uiauto/src/com/arm/wlauto/uiauto/BaseUiAutomation.java index 7e9e7fa2..5f0c9c8a 100755 --- a/wlauto/external/uiauto/src/com/arm/wlauto/uiauto/BaseUiAutomation.java +++ b/wlauto/external/uiauto/src/com/arm/wlauto/uiauto/BaseUiAutomation.java @@ -274,19 +274,19 @@ public class BaseUiAutomation extends UiAutomatorTestCase { public void uiDeviceSwipeUp(int steps) { UiDevice.getInstance().swipe( - getDisplayCentreWidth(), - (getDisplayCentreHeight() / 2), getDisplayCentreWidth(), (getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)), + getDisplayCentreWidth(), + (getDisplayCentreHeight() / 2), steps); } public void uiDeviceSwipeDown(int steps) { UiDevice.getInstance().swipe( - getDisplayCentreWidth(), - (getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)), getDisplayCentreWidth(), (getDisplayCentreHeight() / 2), + getDisplayCentreWidth(), + (getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)), steps); } diff --git a/wlauto/workloads/adobereader/com.arm.wlauto.uiauto.adobereader.jar b/wlauto/workloads/adobereader/com.arm.wlauto.uiauto.adobereader.jar index 2ca5e536..f9337861 100644 Binary files a/wlauto/workloads/adobereader/com.arm.wlauto.uiauto.adobereader.jar and b/wlauto/workloads/adobereader/com.arm.wlauto.uiauto.adobereader.jar differ diff --git a/wlauto/workloads/adobereader/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java b/wlauto/workloads/adobereader/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java index d634cd75..4fff0d41 100755 --- a/wlauto/workloads/adobereader/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java +++ b/wlauto/workloads/adobereader/uiauto/src/com/arm/wlauto/uiauto/UiAutomation.java @@ -71,11 +71,11 @@ public class UiAutomation extends UxPerfUiAutomation { UiObject onboarding_finish_button = new UiObject(new UiSelector().resourceId("com.adobe.reader:id/onboarding_finish_button")); - + if (!onboarding_finish_button.exists()) { welcomeView.swipeLeft(10); } - + clickUiObject(BY_ID, packageID + "onboarding_finish_button", "android.widget.Button"); // Deal with popup dialog message promoting Dropbox access @@ -102,7 +102,7 @@ public class UiAutomation extends UxPerfUiAutomation { private void openFile(final String filename) throws Exception { String testTag = "open_document"; ActionLogger logger = new ActionLogger(testTag, parameters); - + // Select the local files list from the My Documents view clickUiObject(BY_TEXT, "LOCAL", "android.widget.TextView"); UiObject directoryPath = @@ -147,8 +147,8 @@ public class UiAutomation extends UxPerfUiAutomation { // Perform a range of swipe tests at different speeds and on different views LinkedHashMap testParams = new LinkedHashMap(); - testParams.put("swipe_down", new GestureTestParams(GestureType.UIDEVICE_SWIPE, Direction.DOWN, 100)); testParams.put("swipe_up", new GestureTestParams(GestureType.UIDEVICE_SWIPE, Direction.UP, 100)); + testParams.put("swipe_down", new GestureTestParams(GestureType.UIDEVICE_SWIPE, Direction.DOWN, 100)); testParams.put("swipe_right", new GestureTestParams(GestureType.UIOBJECT_SWIPE, Direction.RIGHT, 50)); testParams.put("swipe_left", new GestureTestParams(GestureType.UIOBJECT_SWIPE, Direction.LEFT, 50)); testParams.put("pinch_out", new GestureTestParams(GestureType.PINCH, PinchType.OUT, 100, 50)); @@ -246,7 +246,7 @@ public class UiAutomation extends UxPerfUiAutomation { logger.stop(); // Get back to the main document view by clicking twice on the close button - UiObject searchCloseButton = + UiObject searchCloseButton = new UiObject(new UiSelector().resourceIdMatches(".*search_close_btn") .className("android.widget.ImageView")); searchCloseButton.click(); @@ -266,7 +266,7 @@ public class UiAutomation extends UxPerfUiAutomation { // Return from the document view to the file list view by pressing home and my documents. UiObject actionBar = new UiObject(new UiSelector().resourceIdMatches(".*action_bar.*") - .className("android.view.View")); + .classNameMatches("android.view.View.*")); if (!actionBar.exists()){ tapDisplayCentre(); } @@ -274,14 +274,13 @@ public class UiAutomation extends UxPerfUiAutomation { UiObject homeButton = new UiObject(new UiSelector().resourceId("android:id/home") .className("android.widget.ImageView")); - - //Newer version of app have a menu button instead of home button. + // Newer version of app have a menu button instead of home button. UiObject menuButton = new UiObject(new UiSelector().description("Navigate up") .classNameMatches("android.widget.Image.*")); - if (menuButton.exists()){ - menuButton.clickAndWaitForNewWindow(); + if (homeButton.exists()){ + homeButton.clickAndWaitForNewWindow(); } else if (menuButton.exists()){ menuButton.clickAndWaitForNewWindow(); @@ -292,7 +291,7 @@ public class UiAutomation extends UxPerfUiAutomation { .classNameMatches("android.widget.Image.*")); menuButton.clickAndWaitForNewWindow(); } - + clickUiObject(BY_DESC, "My Documents", "android.widget.LinearLayout", true); UiObject searchBackButton =