mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-21 02:00:49 +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:
parent
494424c8ea
commit
322f9be2d3
Binary file not shown.
@ -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)$"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user