0
任何人都知道是否以及如何从phantomjs shell(a.k.a InteractiveModeREPL)内运行casperjs?如何从phantomjs shell内运行casper?
我也试过路过的直接路径casper.js模块,并已也不奏效。
进展/更新:
- 尝试
phantomjs.injectJs('C:/casperjs/module/casper.js');
但得到Error: Cannot find module 'colorizer'
我想我越来越接近。 - 这让我更接近,但仍缺少路径:
phantomjs.injectJs('C:/casperjs/module/bin/bootstrap.js')
- 错误出与
Cannot find package.json at C:/package.json
- 错误出与
- OK,貌似开始phantomjs时,我可以通过--casper路径选项(见 - casper/bin/bootstrap.js:189行)。
- 确定工作。 (通过选项不起作用,但在幻影内部设置路径)。
不再有效。见[casper 1.1升级](http://docs.casperjs.org/en/latest/upgrading/1.1.html)和[更新的问题](http://stackoverflow.com/questions/19857139/running-casperjs -test合虚线)。 –
它不适合我。 phantomjs 1.9.8不再具有可变的casperPath。 –
在2016年有与casper-1.1.1和phantomjs 1.9.1交互模式的任何解决方法? –