Could we simulate the hold and move behavior using adb?
Just like pick a app from the app view and move to specific position on the screen?
Thanks
Using CulebraTester-public you can touch, hold and swipe. For example, if the drawer is open and there's an icon on (348, 1530)
, you can drag and drop it on (348, 400)
on the home screen using this:
curl -X 'POST' \
'http://localhost:9987/v2/uiDevice/swipe' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"segments": [
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y":1530
},
{
"x": 348,
"y": 1300
},
{
"x": 348,
"y": 1200
},
{
"x": 348,
"y": 1100
},
{
"x": 348,
"y": 1000
},
{
"x": 348,
"y": 900
},
{
"x": 348,
"y": 800
},
{
"x": 348,
"y": 700
},
{
"x": 348,
"y": 600
},
{
"x": 348,
"y": 500
},
{
"x": 348,
"y": 400
}
],
"segmentSteps": 50
}'
You may need to adapt the coordinates for your case.
This can be natively done using
adb shell input swipe x1 y1 x2 y2 duration
tap
is also available as an input option. For a full list, see https://developer.android.com/reference/android/view/KeyEvent.html