我正在使用waitFor()
. 代码如下:
casper.waitFor(function check() {
return this.evaluate(function() {
return this.evaluate(someFunction, 'variable 1','variable 2','variable 3') === 'yes';
});
}, function then() {
console.log('Done');
});
我把它作为控制台输出
Wait timeout of 5000ms expired, exiting.
如何增加超时?
编辑:我已将代码更改为
casper.waitFor(function check() {
return this.evaluate(function() {
return this.evaluate(someFunction, 'variable 1','variable 2','variable 3') === 'yes';
});
}, function then() {
console.log('Done');
},10000);
它给了我以下错误:
CasperError: Invalid timeout function, exiting.
C:/filename:1720 in _check