I am writing an Espresso test case for a camera app. In the test case, I want to know if the photo is actually taken - if so, the broadcast Intent "android.hardware.action.NEW_PICTURE" will be sent. I am trying to use the Espresso-intents library for this, but according to the Espresso website, it can only match intentions that are trying to trigger actions and not broadcast ( https://google.imtqy.com/android-testing-support-library / docs / espresso / intents / # intent-validation ).
So my question is: is it possible to catch broadcasts in espresso? Or are there any other possibilities to catch such intentions in the Instrumentation test case?
source share