Tại sao khi tôi sử dụng console.log
trong evaluate
, nó hoạt động:console.log không hoạt động trong CasperJS' đánh giá với setTimeout
casper.then(function() {
this.evaluate(function() {
console.log('hello');
});
});
Nhưng điều này không làm việc:
casper.then(function() {
this.evaluate(function() {
setTimeout(function() {console.log('hello');}, 1000);
});
});
liên quan: [Output client-side console với casper/phantomjs] (http://stackoverflow.com/a/10783675/1816580) –