Which version of CasperJS is working well with PhantomJS?

时间秒杀一切 提交于 2019-12-13 21:44:49

问题


But the cases often occurred when each of us who new to CasperJS or Phantom.... they start to combine both latest version and try to execute the tutorial (from the old-out-dated resource) >> Result is... error on many parts.

Thus, to overcome this matter. I wish there's some notes about both versions that workings well side-by-side. For instance

casperJS 1.0.4 and phantomJS 1.8.2 >> not a good choice, because function of this.getElementsInfo() will not working well inside the code.


回答1:


  • CasperJS 1.1-beta3 works well with PhantomJS 1.9.0 - 1.9.8.
  • Newest CasperJS from git works well with PhantomJS 1.9.0 - 2.0.0.
  • Avoid PhantomJS 1.9.8 if you need clean output.
  • I recommend to have multiple versions installed: 2.0.0, 1.9.8 and 1.9.7 in parallel as different executables. You can then use set PHANTOMJS_EXECUTABLE=myphantomjs on windows or export PHANTOMJS_EXECUTABLE=myphantomjs on linux to change between them easily just before calling CasperJS. I tend to have the executables phantomjs200, phantomjs198 and phantomjs197 lying around.


来源:https://stackoverflow.com/questions/33624340/which-version-of-casperjs-is-working-well-with-phantomjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!