To run Phantomjs & Casperjs on your system, here is the installation steps you need to follow. Though these are pretty simple ones, but the lack of proper documentation can actually send you on a leather hunt just to get your first case running. So here it is simplified.
1. Download Phantomjs from here.
2. Unzip the entire package to say c:\phantomjs . Ensure that the phantomjs.exe is copied from the subfolder bin to man folder. So your final folder should look somewhat like that.
3. Now head start –> right click my computer, choose properties –> Advanced system properties – > select advanced tab and click on Environment Variables. Append ;C:\phantomjs to your PATH environment variable. Feel free to modify your installation and update the PATH settings to reflect the same
4. Now download Casperjs from their home page
5. Extract the contents to c:\casperjs
6. Ensure you add this PATH into your environment as shown above.
7. Restart system and try these two commands to make sure the PATHs are properly set.
You are now all set!