ksnowlv

回顾过去,总结以往;立足现在,铭记当下;技术为主,笔记而已.

iPhone中自动化运行的脚本

| Comments

支持点击,拖拽。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 var target = UIATarget.localTarget();

for (j=0; j<1000; j++)
{
for (i=0;i<=1000;i++) {
    xPoint = Math.floor(Math.random()*268+1)
    yPoint = Math.floor(Math.random()*300+90)
    target.tap( { x:xPoint, y:yPoint } );
}

for (i=0;i<=1000;i++) {
    xPoint = Math.floor(Math.random()*268+1)
    yPoint = Math.floor(Math.random()*300+90)

    xPoint2 = Math.floor(Math.random()*268+1)
    yPoint2 = Math.floor(Math.random()*300+90)
    target.dragFromToForDuration({x:xPoint, y:yPoint},{x:xPoint2,y:yPoint2},1);
}
}

Comments

comments powered by Disqus
Included file 'custom/after_footer.html' not found in _includes directory