1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-14 06:38:36 +00:00

Merge 5f4b69e3d470bcf8072e5742cc8b4cf51a4d9ce3 into b1e375a6768879003010311e85156b88f8365be5

This commit is contained in:
McGeagh 2016-12-15 16:05:47 +00:00 committed by GitHub
commit 2c9a209d3b
2 changed files with 4 additions and 5 deletions

View File

@ -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();