Following things/steps help me to install and run casperjs on my windows machine properly:
– Node Package Manager
step 01: Install node package manager by following this simple 4 min video
step 02: Install phantomJS using the following command
npm install phantomjs2
Check this link for more details.
step 03: Run the following command
npm install casperjs
To get the phantomjs and casperjs module in command line, add this to windows bin path. To edit the bin path follow this:
- Right click on my computer and click on `Properties`
- go to `advanced system settings`
- click `Enviroment variables`
- from system variables section, select `path` and click on `Edit`
- now add caseperjs and phantomjs path like this at the end of path variable:
where `WINDOWS_GLOBAL_NODE_MODULES_PATH` = Your machine node modules path.
6. To get this path run
npm list -g
First line of the command output is the path.
Now you are all set and check the casperjs command in command line.