Issue
I want to test if imageView with id imageViewTour and tag that contains some_text is displayed.
My test:
onView(allOf(withId(R.id.imageViewTour), withTagValue(containsString("some_text")))).check(matches(isDisplayed()));
But I get compile error:
withTagValue (org.hamcrest.Matchers<java.lang.Object) in ViewMatchers cannot be applied to (org.hamcrest.Matcer<java.lang<String>)
Solution
Use
onView(allOf(withId(R.id.imageViewTour), withTagValue(is((Object) "some_text")))).check(matches(isDisplayed()));
Answered By - stamanuel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.