mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 04:21:17 +00:00
Merge pull request #315 from jimboatarm/fix-adobereader
Fix adobereader
This commit is contained in:
commit
e5c0ca85f0
Binary file not shown.
@ -274,19 +274,19 @@ public class BaseUiAutomation extends UiAutomatorTestCase {
|
|||||||
|
|
||||||
public void uiDeviceSwipeUp(int steps) {
|
public void uiDeviceSwipeUp(int steps) {
|
||||||
UiDevice.getInstance().swipe(
|
UiDevice.getInstance().swipe(
|
||||||
getDisplayCentreWidth(),
|
|
||||||
(getDisplayCentreHeight() / 2),
|
|
||||||
getDisplayCentreWidth(),
|
getDisplayCentreWidth(),
|
||||||
(getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)),
|
(getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)),
|
||||||
|
getDisplayCentreWidth(),
|
||||||
|
(getDisplayCentreHeight() / 2),
|
||||||
steps);
|
steps);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void uiDeviceSwipeDown(int steps) {
|
public void uiDeviceSwipeDown(int steps) {
|
||||||
UiDevice.getInstance().swipe(
|
UiDevice.getInstance().swipe(
|
||||||
getDisplayCentreWidth(),
|
|
||||||
(getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)),
|
|
||||||
getDisplayCentreWidth(),
|
getDisplayCentreWidth(),
|
||||||
(getDisplayCentreHeight() / 2),
|
(getDisplayCentreHeight() / 2),
|
||||||
|
getDisplayCentreWidth(),
|
||||||
|
(getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)),
|
||||||
steps);
|
steps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
@ -147,8 +147,8 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
|
|
||||||
// Perform a range of swipe tests at different speeds and on different views
|
// Perform a range of swipe tests at different speeds and on different views
|
||||||
LinkedHashMap<String, GestureTestParams> testParams = new LinkedHashMap<String, GestureTestParams>();
|
LinkedHashMap<String, GestureTestParams> testParams = new LinkedHashMap<String, GestureTestParams>();
|
||||||
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_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_right", new GestureTestParams(GestureType.UIOBJECT_SWIPE, Direction.RIGHT, 50));
|
||||||
testParams.put("swipe_left", new GestureTestParams(GestureType.UIOBJECT_SWIPE, Direction.LEFT, 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));
|
testParams.put("pinch_out", new GestureTestParams(GestureType.PINCH, PinchType.OUT, 100, 50));
|
||||||
@ -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.
|
// Return from the document view to the file list view by pressing home and my documents.
|
||||||
UiObject actionBar =
|
UiObject actionBar =
|
||||||
new UiObject(new UiSelector().resourceIdMatches(".*action_bar.*")
|
new UiObject(new UiSelector().resourceIdMatches(".*action_bar.*")
|
||||||
.className("android.view.View"));
|
.classNameMatches("android.view.View.*"));
|
||||||
if (!actionBar.exists()){
|
if (!actionBar.exists()){
|
||||||
tapDisplayCentre();
|
tapDisplayCentre();
|
||||||
}
|
}
|
||||||
@ -274,14 +274,13 @@ public class UiAutomation extends UxPerfUiAutomation {
|
|||||||
UiObject homeButton =
|
UiObject homeButton =
|
||||||
new UiObject(new UiSelector().resourceId("android:id/home")
|
new UiObject(new UiSelector().resourceId("android:id/home")
|
||||||
.className("android.widget.ImageView"));
|
.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 =
|
UiObject menuButton =
|
||||||
new UiObject(new UiSelector().description("Navigate up")
|
new UiObject(new UiSelector().description("Navigate up")
|
||||||
.classNameMatches("android.widget.Image.*"));
|
.classNameMatches("android.widget.Image.*"));
|
||||||
|
|
||||||
if (menuButton.exists()){
|
if (homeButton.exists()){
|
||||||
menuButton.clickAndWaitForNewWindow();
|
homeButton.clickAndWaitForNewWindow();
|
||||||
}
|
}
|
||||||
else if (menuButton.exists()){
|
else if (menuButton.exists()){
|
||||||
menuButton.clickAndWaitForNewWindow();
|
menuButton.clickAndWaitForNewWindow();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user