By default espresso waits for the progress bar from my activity to finish loading before executing the next instructions.
I would like to force Espresso not to wait for it and execute the rest of instructions as the progress dialog is loading.
Any hits as to where I should look for that?
After some investigations I assume I must make use of the IdlingResource
class.
Check this answer:
The default timeout that Espresso will wait for all registered resources to become idle is one minute.
You can change this using the
IdlingPolicies
class to set an explicit timeout:IdlingPolicies.setIdlingResourceTimeout(1, TimeUnit.HOURS);
From: Espresso how to wait for some time(1 hour)?
Instead of 1 hour try to set for example 1 second (I don't know if 0
is allowed).
You can also create a custom Idling Resource like it is explained here: Espresso: Thread.sleep( );
Hope it help
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