mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 12:06:08 +00:00
workloads/googlemaps: Fix for alternative layouts.
Add additional check for text based directions button as id can be missing on some devices and allow for skipping the view steps stage for large screen devices which do not require this step.
This commit is contained in:
parent
87ac9c6ab3
commit
ba4004db5f
Binary file not shown.
@ -126,6 +126,9 @@ public class UiAutomation extends BaseUiAutomation {
|
||||
|
||||
public void getDirectionsFromLocation() throws Exception {
|
||||
UiObject directions = mDevice.findObject(new UiSelector().resourceId(packageID + "placepage_directions_button"));
|
||||
if (!directions.exists()){
|
||||
directions = mDevice.findObject(new UiSelector().textContains("DIRECTIONS"));
|
||||
}
|
||||
directions.clickAndWaitForNewWindow(uiAutoTimeout);
|
||||
}
|
||||
|
||||
@ -140,7 +143,9 @@ public class UiAutomation extends BaseUiAutomation {
|
||||
public void viewRouteSteps() throws Exception {
|
||||
UiObject steps = mDevice.findObject(new UiSelector().textContains("STEPS & MORE")
|
||||
.className("android.widget.TextView"));
|
||||
steps.clickAndWaitForNewWindow(uiAutoTimeout);
|
||||
if (steps.exists()){
|
||||
steps.clickAndWaitForNewWindow(uiAutoTimeout);
|
||||
}
|
||||
}
|
||||
|
||||
public void previewRoute() throws Exception {
|
||||
|
Loading…
x
Reference in New Issue
Block a user