教學中 網頁執行腳本有介紹到 迴圈結構
let loop_count;
try {
loop_count = JSON.parse(read(“loop_count.txt”));
} catch(e){
loop_count = 0;
}
if(loop_count < 2){
write(“loop_count.txt”, JSON.stringify(loop_count+1));
repeat(true, 3000);
document.querySelectorAll("a.s-pagination-item.s-pagination-next")[0].click();
} else {
remove(“loop_count.txt”);
}
請教如何撰寫DA 環境的迴圈結構?