Issue
in a screen I have the text "Available" twice. Both has index value 1
Deveice Storage:
Available
SD Card
Available
How i can assert this both "Available" text
Solution
You can use a ViewMatcher that also references the Sibling view.
onView(allOf(withText(containsString("Available")), hasSibling(withText("Device Storage"))).check(matches(isDisplayed()))
onView(allOf(withText(containsString("Available")), hasSibling(withText("SD Card"))).check(matches(isDisplayed()))
Answered By - agoff
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.