|
|
@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
|
|
|
app.launchApp("小红书");
|
|
|
|
|
|
|
|
sleep(3000); // 等待应用启动,根据设备性能调整时间
|
|
|
|
|
|
|
|
click("直播");
|
|
|
|
|
|
|
|
sleep(3000);
|
|
|
|
|
|
|
|
click(500,1000);
|
|
|
|
|
|
|
|
sleep(5000);
|
|
|
|
|
|
|
|
// 定义上滑的起点和终点坐标
|
|
|
|
|
|
|
|
// 这些坐标应该根据你的设备屏幕和小红书应用的UI布局来确定
|
|
|
|
|
|
|
|
var startX = 300; // 起点X坐标
|
|
|
|
|
|
|
|
var startY = 1500; // 起点Y坐标(较高的位置)
|
|
|
|
|
|
|
|
var endX = 300; // 终点X坐标(与起点相同,实现垂直滑动)
|
|
|
|
|
|
|
|
var endY = 500; // 终点Y坐标(较低的位置)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 定义滑动的持续时间(毫秒)
|
|
|
|
|
|
|
|
var duration = 500; // 滑动持续时间,可以根据需要调整
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 无限循环,每隔三秒执行一次上滑操作
|
|
|
|
|
|
|
|
while (true) {
|
|
|
|
|
|
|
|
sleep(2000);
|
|
|
|
|
|
|
|
click("关注");
|
|
|
|
|
|
|
|
sleep(1000);
|
|
|
|
|
|
|
|
click(500,1000);
|
|
|
|
|
|
|
|
sleep(100);
|
|
|
|
|
|
|
|
click(500,1000);
|
|
|
|
|
|
|
|
sleep(500);
|
|
|
|
|
|
|
|
swipe(startX, startY, endX, endY, duration);
|
|
|
|
|
|
|
|
sleep(1000);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|