level 1
gouki777
楼主
我想遍历所有row数组总数,这是一个热搜的 top 20个 然后依次打开。
现在问题是获取不到lst_x.length. 才接触不久 ,不知道 怎么获取这个数组的length
求助~
var list_x = textMatches(className("android.widget.RelativeLayout").column(0).depth(3).row()).find();
for(var i=1;i<list_x.length;i++){
var top = className("android.widget.RelativeLayout").column(0).depth(3).row(i).findOne(1000);
if (top) {
top.click();
sleep(1000);
}
}
2021年06月18日 06点06分
1
现在问题是获取不到lst_x.length. 才接触不久 ,不知道 怎么获取这个数组的length
求助~
var list_x = textMatches(className("android.widget.RelativeLayout").column(0).depth(3).row()).find();
for(var i=1;i<list_x.length;i++){
var top = className("android.widget.RelativeLayout").column(0).depth(3).row(i).findOne(1000);
if (top) {
top.click();
sleep(1000);
}
}