I am new to Espresso and I have this problem: How can I check if some checkBox is checked? I create a matcher from checkbox and I click on it by espresso.
I read some tutorial about use getInstrumentation() but I only can use InstrumentationRegistry.getInstrumentation() and it doesnt work.
In general, how can I create real widget such as Button, CheckBox etc. from Matcher object?
Thanks for help.
After click you can check that checkbox is checked with such expression:
onView(withId(R.id.checkbox)).check(matches(isChecked()));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With