Updating an EditText with Espresso

前端 未结 5 1431
慢半拍i
慢半拍i 2020-12-30 19:00

I\'m attempting to update an EditText as part of an Espresso test with:

onView(allOf(withClassName(endsWith(\"EditText\")), withText(is(\"Test\"         


        
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-30 19:52

    I was having a similar issue and solved it using the containsString matcher and Class.getSimpleName(). Like this:

    onView(withClassName(containsString(PDFViewPagerIVZoom.class.getSimpleName()))).check(matches(isDisplayed()));
    

    You can see the full code here

提交回复
热议问题