skyisle / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
1 stars 0 forks source link

IllegalArgumentException sending click on Kindle Fire #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.  Code up a click() action against view
2.  Run test

What is the expected output? What do you see instead?
Expected:  No crash.  

Got: 
java.lang.IllegalArgumentException
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:111)
at 
com.google.android.apps.common.testing.ui.espresso.base.UiControllerImpl.loopMai
nThreadForAtLeast(UiControllerImpl.java:364)
at 
com.google.android.apps.common.testing.ui.espresso.action.GeneralClickAction.per
form(GeneralClickAction.java:92)
at 
com.google.android.apps.common.testing.ui.espresso.ViewInteraction$1.run(ViewInt
eraction.java:119)

What version of the product are you using? On what operating system?
Espresso 1.1
Kindle Fire 13.3.2.1, Android 4.2.2

Please provide any additional information below.

The crash happens because the checkArgument is looking for > 0 milliseconds for 
delay, which in turn comes from this line:

//GeneralClickAction:92
uiController.loopMainThreadForAtLeast(ViewConfiguration.getPressedStateDuration(
));

On the Kindle Fire ViewConfiguration.getPressedStateDuration() is 0, causing 
the crash.

Original issue reported on code.google.com by s...@crashlytics.com on 27 Mar 2014 at 5:51

GoogleCodeExporter commented 9 years ago

Original comment by vale...@google.com on 7 May 2014 at 7:13

GoogleCodeExporter commented 9 years ago
Also having this issue. Are Amazon Kindle devices not supported by Espresso??

Original comment by jaseub...@gmail.com on 18 Nov 2014 at 9:58

GoogleCodeExporter commented 9 years ago
Fixed in Espresso 2.0

Original comment by vale...@google.com on 20 Dec 2014 at 4:33