Installing CasperJS on Windows: How to do it correctly?

前端 未结 8 1318
天命终不由人
天命终不由人 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:35

    Ok guys. So I think this thread needs refreshing for 2018!

    So with npm, the effort is reduced significantly. Given that you have npm installed, open terminal and go to your project:

    cd your_project_name

    Now install casperjs. Use --save-dev, --save, -g or none as needed:

    npm install --save-dev casperjs

    Now install phantomjs. To do this, you should install phantomjs-prebuilt, because PhantomJS team changed their package name:

    npm install --save-dev phantomjs-prebuilt

    Run your spec:

    casperjs your_spec_name.js

提交回复
热议问题