有没有办法使用Espresso测试小吃店出现的正确文字?
我有一个简单的电话来创建一个小吃吧
Snackbar.make(mView, "My text", Snackbar.LENGTH_LONG).show();
Run Code Online (Sandbox Code Playgroud)
我没有运气就试过这个
onView(withText("My text")).inRoot(withDecorView(not(is(mActivityRule.getActivity().getWindow().getDecorView())))).check(matches(isDisplayed()));
Run Code Online (Sandbox Code Playgroud) android integration-testing android-testing android-espresso android-snackbar