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
707 B
31 lines
707 B
3 weeks ago
|
var appName = "小红书";
|
||
|
launchApp(appName);
|
||
|
toast("打开小红书")
|
||
|
sleep(3000);//确保成功打开
|
||
|
//点击直播标签
|
||
|
click("直播")
|
||
|
toast("点击成功")
|
||
|
//等待加载
|
||
|
sleep(2000);
|
||
|
//进入直播间
|
||
|
click(300, 800);
|
||
|
toast("点击成功");
|
||
|
//等待直播间加载
|
||
|
sleep(2000);
|
||
|
function main() {
|
||
|
// 自动滑屏
|
||
|
for (let i = 0; i < 4; i++) { // 循环10次
|
||
|
click(900, 900);
|
||
|
sleep(100);
|
||
|
click(900, 900);
|
||
|
sleep(1500);
|
||
|
click("关注");
|
||
|
sleep(1500);
|
||
|
// 滑动屏幕
|
||
|
swipe(500, 1500, 500, 500, 100); // 从屏幕底部向上滑动
|
||
|
sleep(2000); // 等待2秒
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// 运行主函数
|
||
|
main();
|