Closed GoogleCodeExporter closed 9 years ago
Same error is shown (after many tests) when using,
onView(withText(R.string.cancel)).perform(click());
com.google.android.apps.common.testing.ui.espresso.PerformException: Error
performing 'single click' on view 'with text: is "Cancel"'.
at
com.google.android.apps.common.testing.ui.espresso.PerformException$Builder.buil
d(PerformException.java:67)
at
com.google.android.apps.common.testing.ui.espresso.base.DefaultFailureHandler.ge
tUserFriendlyError(DefaultFailureHandler.java:57)
at
com.google.android.apps.common.testing.ui.espresso.base.DefaultFailureHandler.ha
ndle(DefaultFailureHandler.java:40)
at
com.google.android.apps.common.testing.ui.espresso.ViewInteraction.runSynchronou
slyOnUiThread(ViewInteraction.java:159)
at
com.google.android.apps.common.testing.ui.espresso.ViewInteraction.doPerform(Vie
wInteraction.java:90)
at
com.google.android.apps.common.testing.ui.espresso.ViewInteraction.perform(ViewI
nteraction.java:73)
at <package>.test.BaseUiTest.selectNegativeDialogButton(BaseUiTest.java:92)
at
<package>.test.DialogIpVerificationTest.testDialog(DialogIpVerificationTest.java
:25)
at java.lang.reflect.Method.invokeNative(Native Method)
at
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at
android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTes
tCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:55
4)
at
com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunne
r.onStart(GoogleInstrumentationTestRunner.java:167)
at
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)
Caused by: com.google.android.apps.common.testing.ui.espresso.PerformException:
Error performing 'Send down montion event' on view 'unknown'.
at
com.google.android.apps.common.testing.ui.espresso.PerformException$Builder.buil
d(PerformException.java:67)
at
com.google.android.apps.common.testing.ui.espresso.action.MotionEvents.sendDown(
MotionEvents.java:90)
at
com.google.android.apps.common.testing.ui.espresso.action.Tap$1.sendTap(Tap.java
:24)
at
com.google.android.apps.common.testing.ui.espresso.action.GeneralClickAction.per
form(GeneralClickAction.java:82)
at
com.google.android.apps.common.testing.ui.espresso.ViewInteraction$1.run(ViewInt
eraction.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4998)
at java.lang.reflect.Method.invokeNative(Native Method)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
at dalvik.system.NativeStart.main(Native Method)
Caused by:
com.google.android.apps.common.testing.ui.espresso.InjectEventSecurityException:
java.lang.SecurityException: Injecting to another application requires
INJECT_EVENTS permission
at
com.google.android.apps.common.testing.ui.espresso.base.InputManagerEventInjecti
onStrategy.injectMotionEvent(InputManagerEventInjectionStrategy.java:131)
at
com.google.android.apps.common.testing.ui.espresso.base.EventInjector.injectMoti
onEvent(EventInjector.java:80)
at
com.google.android.apps.common.testing.ui.espresso.base.UiControllerImpl$3.call(
UiControllerImpl.java:201)
at
com.google.android.apps.common.testing.ui.espresso.base.UiControllerImpl$3.call(
UiControllerImpl.java:198)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.SecurityException: Injecting to another application
requires INJECT_EVENTS permission
at android.os.Parcel.readException(Parcel.java:1461)
at android.os.Parcel.readException(Parcel.java:1415)
at
android.hardware.input.IInputManager$Stub$Proxy.injectInputEvent(IInputManager.j
ava:356)
at android.hardware.input.InputManager.injectInputEvent(InputManager.java:641)
at java.lang.reflect.Method.invokeNative(Native Method)
at
com.google.android.apps.common.testing.ui.espresso.base.InputManagerEventInjecti
onStrategy.injectMotionEvent(InputManagerEventInjectionStrategy.java:122)
... 9 more
Original comment by matthew....@gmail.com
on 1 Mar 2014 at 1:42
I'm facing this same issue intermittently with menu items in the action bar.
Original comment by GoncaloS...@gmail.com
on 4 Mar 2014 at 5:10
Same issue here, but with Robotium. This may be an issue of the x86 system
image and not of espresso.
Original comment by kn...@synyx.de
on 7 Apr 2014 at 1:31
Same here on HW device with KitKat 4.4.2. Anims off.
Original comment by seva...@gmail.com
on 1 May 2014 at 1:58
This means that something (e.g. a system ANR dialog or keyguard) is blocking
the view you're trying to click. This is outside Espresso scope and should be
fixed on a device setup level.
Original comment by vale...@google.com
on 6 May 2014 at 11:58
At least in my case this only happens with menu items on the action bar. It's
intermittent, but easily reproducible. I doubt there's any ANR involved,
otherwise I'd probably see it with regular views. No?
Original comment by GoncaloS...@gmail.com
on 8 May 2014 at 10:45
Original issue reported on code.google.com by
matthew....@gmail.com
on 1 Mar 2014 at 1:25