gpt4 book ai didi

jasmine - JSOver 与 PhantomJS - 类型错误 : 'null' is not an object

转载 作者:行者123 更新时间:2023-12-02 13:09:00 24 4
gpt4 key购买 nike

当我尝试使用 PhantomJS 运行 JSCover 时,我看到以下错误:

遵循的步骤:

1) 运行 JSOver 服务器:

java -jar ~/JSCover/target/dist/JSCover-all.jar -ws --report-dir=report

2) 使用 JSOver 运行 PhantomJS 运行程序: *phantomjs --debug=true ~/JSCover/src/test/javascript/lib/PhantomJS/run-jscover-jasmine.js localhost8080/<app>/module/framework/test/SpecRunner.html

TypeError: 'null' is not an object (评估''document.body.querySelector('.description').innerText')`

phantomjs://webpage.evaluate():3 phantomjs://webpage.evaluate():22 phantomjs://webpage.evaluate():22 2013-09-19T16:36:07 [DEBUG] WebPage - evaluateJavaScript result QVariant(, )2013-09-19T16:36:07 [DEBUG] 网页 - 评估JavaScript“(function() { return (function () { jscoverage_report('幻影'); })(); })()"2013-09-19T16:36:07 [DEBUG] 网页 - 评估 JavaScript 结果 QVariant(, )2013-09-19T16:36:07 [DEBUG] 网络 - 资源请求错误:5(“操作已取消”)URL:localhost8080/<app_home>/lib/backbone/1.0.0/backbone.js?cb=0.5381254460662603

最佳答案

这是我昨天遇到的问题。事实证明,示例脚本不适用于较新的版本,因此我构建了一个适用于 Jasmine 2.X 的新 Phantom 脚本,修复了该问题。您可以在我的存储库中找到工作脚本:

https://github.com/tkaplan/PhantomJS-Jasmine

关于jasmine - JSOver 与 PhantomJS - 类型错误 : 'null' is not an object,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18907081/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com