关闭

monkeyrunner 录制脚本

1586人阅读 评论(1) 收藏 举报

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. 

关键字:
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)三个参数..

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:576585次
    • 积分:7435
    • 等级:
    • 排名:第3027名
    • 原创:168篇
    • 转载:43篇
    • 译文:0篇
    • 评论:128条
    最新评论