PhantomJS is a scripted, headless browser used for automating web page interaction. A headless browser is a web browser without a graphical user interface. PhantomJS was released January 23, 2011 by Ariya Hidayat after several years in development.
Open your browser and go to the PhantomJS website’s download page to get the link to the zip file. Download the PhantomJS for your particular operating system. Extract it. Move the folder phantomjs-2.1.1-windows and all of its contents (files and sub-folders) to your C: drive. The executable is in the bin folder. Now, the path to the PhantomJS executable will be located here: C:\phantomjs-2.1.1-windows\bin.
In order for programs to be able to locate the PhantomJS executable file, create an environment variable using PATH in Window’s Control Panel, System and Security, System, Advanced System Settings, Environment Variables. In the top section of User variables, select PATH. Click the Edit button on the right side of the screen. Click New. Type in the path to your Phantom directory, which will be:C:\phantomjs-2.1.1-windows\bin.