一个android monkey自动化脚本demo

来源:互联网 发布:知乎白云先生是谁 编辑:程序博客网 时间:2024/05/22 17:22
# Start of Script  
type= user  
count= 8
speed= 1.0  
start data >>   
DispatchPointer(0, 0, 0, 210, 300, 0,0,0,0,0,0,0)            
DispatchPointer(1, 1, 2, 210, 300, 0,0,0,0,0,0,0)
DispatchPointer(2, 2, 2, 220, 300, 0,0,0,0,0,0,0)
DispatchPointer(3, 3, 2, 230, 300, 0,0,0,0,0,0,0)
DispatchPointer(4, 4, 2, 240, 300, 0,0,0,0,0,0,0)
DispatchPointer(5, 5, 2, 250, 300, 0,0,0,0,0,0,0)
DispatchPointer(6, 6, 2, 250, 300, 0,0,0,0,0,0,0)
DispatchPointer(7, 7, 2, 250, 300, 0,0,0,0,0,0,0)
DispatchPointer(8, 8, 1, 250, 300, 0,0,0,0,0,0,0)

UserWait(1000) 


该脚本模块滑动操作。


DispatchPointer(0, 0, 0, 210, 300, 0,0,0,0,0,0,0)    -> MOTION.ACTION_DOWN

DispatchPointer(0, 2, 0, 210, 300, 0,0,0,0,0,0,0)    -> MOTION.ACTION_MOVE

DispatchPointer(0, 1, 0, 210, 300, 0,0,0,0,0,0,0)    -> MOTION.ACTION_UP