I'm really new with esspresso issues and I have a little question, I need to emulate that users click on a button, tree times, but with some delay. A Human, takes some time to click a button, maybe with one second delay.
Whats the better way to made that on an esspresso test? othere frameworks have sleep, and so on... but I think that espresso hasen't. Any idea?
--Edited: I made this, but don't know if it's correct:
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Another way, but more clear, if you don't use thread.interrupt() is this:
SystemClock.sleep(millis)
for (int = i; i < numOfClicks; i++) {
onView(<matcher for your view>).perform(click());
SystemClock.sleep(1000);
}
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