这个简单的检查适用于 sdk 29,但不适用于 sdk 30:
onView(withText(R.string.text)).inRoot( withDecorView(not(mActivityRule.activity.window.decorView))) .check(matches(isDisplayed()))
我得到 androidx.test.espresso.NoMatchingRootException。
任何人都可以帮助解决这个问题吗?
android matcher assertion android-toast android-espresso
android ×1
android-espresso ×1
android-toast ×1
assertion ×1
matcher ×1