1

我正在使用 casperjs,它又在 slimerjs 和 phantomxhr 上运行。我不确定使用 slimerjs+ca​​pserjs 是否支持 phantomxhr,但在运行代码时出现“window.sinon is undefined”错误(Phantomxhr.js 第 124 行出现错误)。使用 phantomjs 运行 casperjs 时一切正常。

注入给定 phantomxhr 的 sinon js 脚本时似乎出现问题(第 24 行)。所以我所做的是,在测试文件中添加一行'phantom.injectJs('Absolute path to sinon.js file').这甚至没有打开浏览器。我做错了什么。任何指针都会有所帮助。

4

0 回答 0