monkeyrunner
The monkeyrunner tool provides an API for writing programs that control an Android device or emulator from outside of Android code. With monkeyrunner,
you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation.
you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation.
关键字:
python,发送命令,截图
常用脚本:
monkey_recorder.py
monkey_placback.py
help.py
位置在源码目录: /sdk/monkeyrunner/scripts/monkey_recorder.py
1. 录制脚本mr到python脚本的转义
例如:TOUCH|{'x':60,'y':768,'type':'downAndUp',} 这是录制脚本生成的,我们要转义成python用的话其实很简单...
x,y,type对应我们python 脚本中devices.touch(x,y,type)三个参数..
x,y,type对应我们python 脚本中devices.touch(x,y,type)三个参数..