【问题标题】:Taking snapshots of the webpage while unit testing using phantomjs and jasmine在使用 phantomjs 和 jasmine 进行单元测试时拍摄网页快照
【发布时间】:2012-05-09 19:24:32
【问题描述】:

我似乎无法让 jasmine 和 phantomjs 正常工作。我正在使用 phantomjs 的示例文件夹中的 run-jasmine.js 文件。我得到的问题是该文件找不到系统,所以它不能要求它。

这是具体信息:

undefined:0 Unknown module system for require()

最重要的是,我想知道如何使用 jasmine 对 html 文件进行 dom 操作。

编辑:看起来 DOM 问题很简单,因为它只是使用了 phantom js 的无头浏览器功能。我仍然有系统问题,我想知道如何在每次测试之间而不是在页面加载完成时调用渲染页面。

【问题讨论】:

    标签: unit-testing jasmine snapshot phantomjs


    【解决方案1】:

    我按照此页面上的说明解决了这个问题

    https://groups.google.com/forum/#!topic/phantomjs/Ac-77s4kFGk

    基本上,如果您从 debian 存储库安装 phantomjs,它不是最新的。从他们的官方网站安装最新版本就可以了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-12
      • 2019-12-19
      • 1970-01-01
      • 2012-07-15
      • 1970-01-01
      • 1970-01-01
      • 2015-09-01
      • 1970-01-01
      相关资源
      最近更新 更多