2
我正在用濃咖啡寫一些測試。我想點擊複選框並通過測試進行檢查。但我不能。我試着用ıd和contentdescription。濃咖啡發現意見,但不能執行。我無法點擊濃咖啡複選框
onView(withContentDescription("register check box 1"))
.check(matches(isNotChecked()))
.perform(click())
.check(matches(isChecked()));
我得到了那個錯誤。
android.support.test.espresso.PerformException: Error performing 'sıngle click' on view 'with content description: is "register check box 1"'.
at android.support.test.espresso.PerformException$Builder.build(PerformException.java:83)
at android.support.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:70)
at android.support.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:53)
at android.support.test.espresso.ViewInteraction.runSynchronouslyOnUiThread(ViewInteraction.java:184)
at android.support.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:115)
at android.support.test.espresso.ViewInteraction.perform(ViewInteraction.java:87)
你可以回答你自己的問題。請發佈答案,然後接受它。因爲你的解決方案不容易看到。謝謝。 –
好吧我會做到的。 –