Installing CasperJS on Windows: How to do it correctly?

前端 未结 8 1348
天命终不由人
天命终不由人 2020-12-28 13:52

I know there is a documentation from CasperJS website about how to install CasperJS on Windows, but bear with me these guys only explained for the pros only.

If you

8条回答
  •  盖世英雄少女心
    2020-12-28 14:51

    Many of the other answers are out of date. Since it seems like the correct install process keeps changing all the time, I suspect my answer will be out of date also in a few days, but as of March 19, 2015, this is the answer. The other answers, even highly upvoted ones, do not work, so don't waste your time. Good luck. Casperjs seems quite good.

    If you download PhantomJS 2.0 and casperjs 1.1-beta3 zip file and put the batchbin directory in the path and put phantom exe in that same folder, then run casperjs, on Windows 8.1 I get the error "CasperJS needs PhantomJS v1.x".

    So, I got the latest casperjs direct from github, which has no batchbin directory, so I put just the C:\casperjs\bin directory in the path instead and this worked (sort of, I mean it seems to work well enough for me - although running casperjs c:\casperjs\tests\selftest.js seems to have a number of failing tests).

    So to recap, the bad news is only the very latest bleeding edge casperjs works. The good news is the install is 1,2,3 simple:

    1. Clone latest casperjs from github into c:\casperjs.
    2. Copy phantomjs.exe (ver 2.0) to c:\casperjs\bin
    3. Add c:\casperjs\bin to your windows path

提交回复
热议问题