I have been implementing android espresso test for a week. What is the real thing - is implementing server call and wait for it with espresso. This is called Idle Resource c
I'm having the same issue, and I think the main problem is that, the button, opens a new Indent, but seems that this alone don't cause the bug, which is very strange, it only happens when you typeText on an EditText before calling the click().
P.S: I managed to work that out, seems like I had a couple of doubled dependency problems, once I solved that, the tests worked out without any problem and without the need to do any work around.
My build.gradle part of the espresso ended like this:
dependencies {
repositories {
mavenCentral()
}
// Espresso
compile 'org.apache.commons:commons-lang3:3.1'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.0') {
exclude group: 'com.google.guava'
exclude module: 'espresso-idling-resource'
}
androidTestCompile('com.android.support.test:testing-support-lib:0.1') {
exclude group: 'com.google.guava'
exclude module: 'espresso-idling-resource'
}
}
I also added this before dependencies:
configurations {
androidTestCompile.exclude group: 'com.android.support'
androidTestCompile.exclude module: 'support-v4'
androidTestCompile.exclude module: 'appcompat-v7'
}