【发布时间】:2013-08-13 08:35:10
【问题描述】:
我正在使用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
【问题讨论】:
标签: javascript phantomjs casperjs