Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Phantomjs CasperJS没有';单击后无法更新页面_Phantomjs_Casperjs - Fatal编程技术网

Phantomjs CasperJS没有';单击后无法更新页面

Phantomjs CasperJS没有';单击后无法更新页面,phantomjs,casperjs,Phantomjs,Casperjs,在将casperJS更新到最新版本后,我遇到了一个问题 this.clickLabel('Add a link...', 'span'); this.sendKeys('input[id="newLinkSourceUrl"]', "http://google.com", {keepFocus: true, reset: true}); this.clickLabel('Shrink', 'span'); this.wait(30000, function() {

在将casperJS更新到最新版本后,我遇到了一个问题

this.clickLabel('Add a link...', 'span');
    this.sendKeys('input[id="newLinkSourceUrl"]', "http://google.com", {keepFocus: true, reset: true});
    this.clickLabel('Shrink', 'span');

    this.wait(30000, function() {
          this.capture('n1.png');
    });
这过去工作正常,但现在点击“收缩”后,页面即使等待很长时间也不会更新。我正在附上我得到的结果。

您使用哪个PhantomJS版本?请注册到
resource.error
page.error
remote.message
casper.page.onResourceTimeout
事件()。可能有错误。我目前正在使用2.1.1 PhantomJS版本。我刚刚注册了这些事件,您是对的,有一个资源错误。ResourceError:{“errorCode”:5,“errorString”:“操作已取消”,“id”:168,“状态”:null,“状态文本”:null,“url”:“”}您可以尝试使用
casperjs运行它--忽略ssl errors=true script.js
但它返回的结果完全相同。我使用的是phantomjs和casperjs的最新版本,也许我应该尝试降级其中一个?这几乎肯定是phantomjs的问题,但我怀疑降级能否解决它。您可以按该顺序尝试1.9.8、1.9.7和2.0.1/2.0.0。