Continuous integration TypeError:null不是对象(正在计算';document.body.querySelector(';.alert>;.bar.passed';)。innerText';)

Continuous integration TypeError:null不是对象(正在计算';document.body.querySelector(';.alert>;.bar.passed';)。innerText';),continuous-integration,jasmine,phantomjs,teamcity-8.0,Continuous Integration,Jasmine,Phantomjs,Teamcity 8.0,由于某些原因,我的jasmine测试间歇性地运行失败(或者至少报告运行失败)。错误在run-jasmine.js中,错误显示为 `TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText') phantomjs://webpage.evaluate():58 phantomjs://webpage.evaluate():61` 我

由于某些原因,我的jasmine测试间歇性地运行失败(或者至少报告运行失败)。错误在run-jasmine.js中,错误显示为

`TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')
phantomjs://webpage.evaluate():58
phantomjs://webpage.evaluate():61` 
我正在运行TeamCity 8.1.3(构建30101)、Jasmine 2.2.0和phantomjs 2.0.0。 生成步骤命令参数为

--web-security=no
--local-to-remote-url-access=yes
--ignore-ssl-errors=yes
jasmine/run-jasmine.js
specs/SpecsRunner.html
我试着降低茉莉花和幻影的等级,但没有改变。我也尝试过各种run-jasmine.js脚本,但都没有用。还有其他人有类似的问题吗

直到几天前一切都很好,现在90%的时间都是这样


提前感谢。

我找到了一个新的run-jasmine.js脚本来完成这项工作


我以前尝试过这个脚本,但遇到超时问题,所以我继续,但现在我已将脚本中的“默认最大超时”增加到60秒,这似乎做得很好。

可能有人更改了网站,现在你必须调整测试以适应新的要求,或者击中此人的头部。我希望如此。所有测试都可以在浏览器中正常运行。类型错误发生在run-jasmine.js脚本中。您最近更新过您提到的任何工具吗?你可能需要在事情发生之前稍等一下。该错误表明该元素尚未出现在页面上。也许你说得太快了。我也有同样的问题,并且也尝试过各种run-jasmine.js脚本。还没有找到解决办法…吉姆干杯,至少现在我并不感到孤独。如果我找到解决方案,我会发回这里谢谢,解决了问题。