You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
910 B
31 lines
910 B
var appName = "小红书";
|
|
launchApp(appName);
|
|
toast("打开小红书")
|
|
sleep(3000);//确保成功打开
|
|
//点击直播标签
|
|
click("直播")
|
|
toast("点击成功")
|
|
//等待加载
|
|
sleep(3000);
|
|
function getRandomInt(min, max) {
|
|
min = Math.ceil(min);
|
|
max = Math.floor(max);
|
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
}
|
|
for (let i = 0; i <= getRandomInt(0,7); i++) { // 循环10次
|
|
// 滑动屏幕
|
|
swipe(500, 500, 500, 1500, 100); // 从屏幕顶部向下滑动
|
|
sleep(2000); // 等待2秒
|
|
}
|
|
for (let i = 0; i <= getRandomInt(0,14); i++) { // 循环10次
|
|
// 滑动屏幕
|
|
swipe(500, 1500, 500, 1153, 100); // 从屏幕底部向上滑动
|
|
sleep(2000); // 等待2秒
|
|
}
|
|
click(getRandomInt(15,544),getRandomInt(299,2239));
|
|
for(let i=0;i <= getRandomInt(10,30);i++) {
|
|
click(900,900);
|
|
sleep(100);
|
|
click(900,900);
|
|
sleep(200);
|
|
} |