android / android-test

An extensive framework for testing Android apps
https://android.github.io/android-test
Apache License 2.0
1.16k stars 314 forks source link

Espresso: [FR] - Implement Drag and Drop API #228

Open jongerrish opened 5 years ago

jongerrish commented 5 years ago

It would be nice if we have any framework methods to do drag and drop in espresso. As of now, we only have swipe gesture in espresso. If I try actions with longclick() and swipe() to drag a view, getting the following exception.

"android.support.test.espresso.InjectEventSecurityException: java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission"

jongerrish commented 5 years ago

See https://b.corp.google.com/issues/122552231

ychescale9 commented 5 years ago

The status of the issue is Won't Fix (Obsolete) on the issue tracker. What's the recommended way for testing drag and drop with Espresso?