1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-05 18:31:12 +01:00

workloads/googleplaybooks: Fix book selector

Do not try and use a parent element of the book entry, search for the entry
directly.
This commit is contained in:
Marc Bonnici 2019-12-13 13:46:01 +00:00
parent 494424c8ea
commit 322f9be2d3
2 changed files with 1 additions and 2 deletions

View File

@ -238,8 +238,7 @@ public class UiAutomation extends BaseUiAutomation implements ApplaunchInterface
// Create a selector so that we can search for siblings of the desired // Create a selector so that we can search for siblings of the desired
// book that contains a "free" or "purchased" book identifier // book that contains a "free" or "purchased" book identifier
UiObject label = UiObject label =
mDevice.findObject(new UiSelector().fromParent(new UiSelector() mDevice.findObject(new UiSelector().description(String.format("Book: " + bookTitle))
.description(String.format("Book: " + bookTitle))
.className("android.widget.TextView")) .className("android.widget.TextView"))
.resourceId("com.android.vending:id/li_label") .resourceId("com.android.vending:id/li_label")
.descriptionMatches("^(Purchased|Free)$")); .descriptionMatches("^(Purchased|Free)$"));