将casperjs从1.9.8升级为使用phantomjs 2.0
我读到人们已经找到了让casperjs使用phantomjs 2.0的方法,但是我该如何升级呢?例如,仅将/usr/../casperjs/node_modules/phantomjs中的phantomjs文件夹替换为phantomjs2的文件夹似乎不起作用。我还在lib/bootstrap.js中进行了更改,以处理使用2.0时出现的警告将casperjs从1.9.8升级为使用phantomjs 2.0,phantomjs,casperjs,Phantomjs,Casperjs,我读到人们已经找到了让casperjs使用phantomjs 2.0的方法,但是我该如何升级呢?例如,仅将/usr/../casperjs/node_modules/phantomjs中的phantomjs文件夹替换为phantomjs2的文件夹似乎不起作用。我还在lib/bootstrap.js中进行了更改,以处理使用2.0时出现的警告 我正在使用mocha casperjs创建我的测试。如果您想使用PhantomJS 2,那么您当前需要 安装(支持PhantomJS 2)并更改mocha
我正在使用mocha casperjs创建我的测试。如果您想使用PhantomJS 2,那么您当前需要
- 安装(支持PhantomJS 2)并更改mocha casperjs中的固定路径或
- 删除CasperJS中的PhantomJS版本检查,如图所示
好的,我试试看。我在虚拟机上全局安装phantomjs2时遇到了一点问题(有一个ELIFECYCLE错误说在phantomjs2@2.0.0安装脚本'node install.js'),尽管它在我的本地机器上安装得很好。我真的没有。我自己编译了PhantomJS2 raspberry pi。 path/to/casperjs $mcPath/cli.js --mocha-casperjs-path=$mcPath/.. $* casperjs $mcPath/cli.js --mocha-casperjs-path=$mcPath/.. $* npm -g install phantomjs2