adb shell input的用法

C:\Documents and Settings\Administrator>adb shell
root@NX403A:/ # input
input
Usage: input []  [...]

The sources are:
      trackball
      joystick
      touchnavigation
      mouse
      keyboard
      gamepad
      touchpad
      dpad
      stylus
      touchscreen

The commands and default sources are:
      text  (Default: touchscreen)
      keyevent [--longpress]  ... (Default: keyboard)
      tap   (Default: touchscreen)
      swipe     [duration(ms)] (Default: touchscreen)
      press (Default: trackball)
      roll   (Default: trackball)

1,模拟输入文本信息:input text HelloWorld


2.模拟物理按键操作: input keyevent KEYCODE_VOLUME_DOWN


3.模拟点击操作:input tap 500 500


4.模拟滑动操作:input swipe 200 500  400 500


5.模拟轨迹球操作


你可能感兴趣的:(Android测试)