adb コマンドのみで画面のスクロールを行ったので、今回はその方法についてメモしておこうと思います。
スクロール方法
現在の端末のディスプレイサイズを取得する
adb shell wm size Physical size: 1080x2160
adb コマンドで swipe のイベントを送る
adb shell input wipe X1 Y1 X2 Y2 [duration(ms)]
で指定します。
Y 軸は、上部が 0, 下部が Physical size の最大値となります。
# 上から下にスワイプ。通知などが出てくる $ adb shell input swipe 100 500 100 1450 100 # 下から上にスワイプ。 $ adb shell input swipe 100 500 100 50 100```
ちなみに、タップも同様にできます
$ adb shell input tap 500 1450