mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
Fix adobereader on S7
Tested on S7
This commit is contained in:
parent
b1e375a676
commit
f76c00dd99
@ -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