NoMatchingViewException
全部标签 我正在试用新的Android测试库Espresso。当我尝试时:onView(withId(R.id.gettingStarted))测试运行良好。但是当我尝试时:onView(withId(R.id.gettingStarted)).check(matches(isDisplayed()));我得到一个.NoMatchingViewException:Noviewsinhierarchyfoundmatching:withid:is有没有人见过这样的事情?我最初的react是这只是一个错误,因为Espresso仅在1.0版本上。我正在使用AndroidStudio并严格按照设置说明进
我正在尝试编写一个简单的测试,我只需单击主Activity中的MenuItem:publicclassdoTestextendsActivityInstrumentationTestCase2{publicdoTest(){super(doActivity.class);}@OverridepublicvoidsetUp()throwsException{super.setUp();startActivity();}privatevoidstartActivity(){Intentintent=newIntent();setActivityIntent(intent);getActiv