Comments (19)
Not an espresso bug.
Common cases that cause this:
- ANR/crash dialogs from other apps (can be handled on a device setup level.
This is quite involved and is outside the scope of UI test execution)
- soft keyboard is showing (can be handled by adding closeSoftKeyboard action)
You can confirm by observing the test during execution or taking a screenshot
on failure.
Original comment by [email protected]
on 14 Jan 2014 at 7:41
- Changed state: Invalid
from android-test-kit.
I disagree. Would appreciate it you could look more closely at the bug
description I provided or if you could try out the sample application attached.
For instance,
1. closeSoftKeyboard() is being called
2. There are no other dialogs showing
3. Animations are disabled
The attached GIF shows what's happening.
I've had to work around this in my code by adding a sleep after the
closeSoftKeyboard which seems to defeat the purpose of Espresso.
Original comment by [email protected]
on 14 Jan 2014 at 7:51
from android-test-kit.
The same issue (with the same scenario) is reproducible for me as well? Why the
bug is market as invalid?
Original comment by [email protected]
on 5 Feb 2014 at 2:59
from android-test-kit.
Having same issue. The soft keyboard is dismissed but the perform click still
fails.
Original comment by [email protected]
on 7 Feb 2014 at 9:25
from android-test-kit.
I'm getting this issue as well, along with ensuring I'm using the
closeSoftKeyboard() method.
And indeed, a wait before the click() fixes it for me, but negates the reason
I'm using Espresso unfortunately.
Even more strange is the fact that a Thread.sleep(1) works.
Original comment by [email protected]
on 11 Feb 2014 at 7:24
from android-test-kit.
I can reproduce it as well... just could hack it like said with
Thread.sleep(1000ms) !
Original comment by [email protected]
on 13 Feb 2014 at 11:48
from android-test-kit.
Confirmed. Same issue with my tests.
Original comment by [email protected]
on 4 Mar 2014 at 7:05
from android-test-kit.
same here :(
Original comment by [email protected]
on 7 Mar 2014 at 9:54
from android-test-kit.
The same for me. But somehow it worked before. Now I always have this issue.
Maybe it is related to SDK update?
Original comment by [email protected]
on 3 Apr 2014 at 12:02
from android-test-kit.
I noticed the problem for e-mail field
Original comment by [email protected]
on 3 Apr 2014 at 12:03
from android-test-kit.
Facing the same issue. Is there a patch or fix for it?
Original comment by [email protected]
on 8 May 2014 at 7:12
from android-test-kit.
I didn't have to close the soft keyboard a few months ago when I initially
wrote tests using Espresso. Also, using closeSoftKeyboard does not always work
so the test is now flaky. Does anyone know what introduced this issue in the
first place? This is definitely not an invalid issue.
Original comment by [email protected]
on 23 Jul 2014 at 9:14
from android-test-kit.
[deleted comment]
from android-test-kit.
I've worked around this issue by writing my own tiny keyboard that is 32dp
tall. It seems to work much better than having the stock keyboard.
https://github.com/johnybot/TestingKeyboard
Original comment by [email protected]
on 28 Jul 2014 at 9:34
from android-test-kit.
Have the same problem with espresso-contrib-1.1. In login test scenario after
typeText() and call closeSoftKeyboard() without thread.sleep() it cause
"PerformException: Error performing 'single click' on view". With
thread.sleep() it works. Test on real device (lenovo A7600)
Original comment by [email protected]
on 16 Sep 2014 at 8:34
from android-test-kit.
I have that issue too on my Panasonic FZ-A1.
Heres how i solved it:
onView(withId(R.id.testEdit)).perform(typeText("Have a cup of Espresso."),
closeSoftKeyboard());
Thread.sleep(1000);
dunno why it works with a sleep, but it works....
Original comment by [email protected]
on 22 Oct 2014 at 10:44
from android-test-kit.
[deleted comment]
from android-test-kit.
I can repro it as well. Please fix if you want people to use espresso.
Original comment by [email protected]
on 26 Dec 2014 at 6:54
from android-test-kit.
#18 Same issue here (New status)
https://code.google.com/p/android-test-kit/issues/detail?id=79
Original comment by [email protected]
on 28 Dec 2014 at 7:06
from android-test-kit.
Related Issues (20)
- ActivityFinisher should wait until all finishing Activities are completely destroyed before running next test
- withText matches Buttons too HOT 1
- DexException Multiple dex files define Ljunit/extenstions/ActiveTestSuite$1; HOT 4
- withContentDescription doesn't have resId overload
- AndroidJUnitRunner cannot create ActivityUnitTestCase's target activity HOT 3
- Adding "androidTestCompile 'com.android.support.test.espresso:espresso-core:2.0'" to dependencies causes build to fail HOT 3
- AndroidJUnitRunner doesn't run JUnit test with clear JUnit4 style HOT 1
- Espresso2.0 (bundled with guava) - NoSuchMethodError while initializing Espresso HOT 1
- Google maps support
- AndroidJUnit4 should skip tests with failing assumptions
- scrollTo() is not working?
- is enabled doesn't match the selected view HOT 1
- Cannot build on Maven 3.2.5
- Clicking on Component when developer don't know the ID of the component
- Espresso does not wait until SwipeRefreshLayout RefreshListener finished HOT 1
- Unable to switch on EditText overflowed by auto-complete view
- Russian text in EditText throws an exception
- Russian letter
- Unregistering idling resource causes the Espresso to think we have busy idling resources HOT 1
- Update Support Annotations version used by Espresso Contrib
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-test-kit.