1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 20:11:20 +00:00

workloads/googleplaybooks: Fix ui match

The resource id of the book list cannot always be discovered, search
for the only scrollable list instead.
This commit is contained in:
Marc Bonnici 2022-04-29 16:38:58 +01:00
parent 29a5a7fd43
commit d1e960e9b0
2 changed files with 1 additions and 2 deletions

View File

@ -233,8 +233,7 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
mDevice.findObject(new UiSelector().resourceId("com.android.vending:id/search_results_list")); mDevice.findObject(new UiSelector().resourceId("com.android.vending:id/search_results_list"));
if (!resultList.waitForExists(viewTimeout)) { if (!resultList.waitForExists(viewTimeout)) {
resultList = resultList =
mDevice.findObject(new UiSelector().className("android.support.v7.widget.RecyclerView") mDevice.findObject(new UiSelector().scrollable(true));
.scrollable(true));
if (!resultList.waitForExists(viewTimeout)) { if (!resultList.waitForExists(viewTimeout)) {
throw new UiObjectNotFoundException("Could not find search results list."); throw new UiObjectNotFoundException("Could not find search results list.");
} }