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>)
Use
onView(allOf(withId(R.id.imageViewTour), withTagValue(is((Object) "some_text")))).check(matches(isDisplayed()));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With