Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.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 错误:window.sinon未定义_Phantomjs_Casperjs_Sinon_Slimerjs - Fatal编程技术网

Phantomjs 错误:window.sinon未定义

Phantomjs 错误:window.sinon未定义,phantomjs,casperjs,sinon,slimerjs,Phantomjs,Casperjs,Sinon,Slimerjs,我正在使用casperjs,它反过来又在slimerjs和phantomxhr上运行。我不确定phantomxhr是否支持slimerjs+capserjs,但我在运行代码时遇到了“window.sinon is undefined”错误(错误在phantomxhr.js第124行)。使用phantomjs运行casperjs时,一切都正常 看起来在注入给定phantomxhr的sinon js脚本时出现了问题(第24行)。所以我所做的是,在测试文件'phantom.injectJs(“sino

我正在使用casperjs,它反过来又在slimerjs和phantomxhr上运行。我不确定phantomxhr是否支持slimerjs+capserjs,但我在运行代码时遇到了“window.sinon is undefined”错误(错误在phantomxhr.js第124行)。使用phantomjs运行casperjs时,一切都正常

看起来在注入给定phantomxhr的sinon js脚本时出现了问题(第24行)。所以我所做的是,在测试文件
'phantom.injectJs(“sinon.js文件的绝对路径”)中添加一行。
这甚至不会打开浏览器。我做错了什么。任何指针都会有帮助