0
すべてのページでスクリーンショットをキャプチャしたいと思います。別のページに移動するには、関数moveNext()
があります。コンソールにチェックインすると、順番にすべてのページに移動していることがわかります。しかし、その代わりにすべてのページで同時にスクリーンショットを撮っていないので、最後のページの複数のスクリーンショットが必要です。 casperjsはコールバックまたは待機オプションを提供していますか?PhantomCSSのスクリーンショットがループ内で正しく機能しない
casper.then(function() {
for (var currentPage = startPage; currentPage < lastPage; currentPage++) {
this.page.evaluate(function(currentPage) {
moveNext(currentPage);
}, currentPage);
phantomcss.screenshot('html', 'screenshot');
console.log(currentPage);
}
});