0
私はwhileループでcasper.then()アクションをネストしようとしています。しかし、スクリプトはcasper.then()関数の中でコードを実行することはないようです。ループ内でのcasper.jsアクションのネスト
ここに私のコードは
だcasper.then(function() {
while (this.exists(x('//a[text()="Page suivante"]'))) {
this.then(function() {
this.click(x('//a[text()="Page suivante"]'))
});
this.then(function() {
infos = this.evaluate(getInfos);
});
this.then(function() {
infos.map(printFile);
fs.write(myfile, "\n", 'a');
});
}
});
私は何かが足りないのですか?