For Windows Download the zip file, unpack it and you will get an executable phantom.exe. Set the PATH environment variable to the path of phantom.exe file. Open a new command prompt and type phantomjs –v. It should give you the current version of PhantomJS that is running.
How do you check PhantomJS is installed or not?
- first check current version: phantomjs –version 1.9.0.
- Find location of installed phantomjs: which phantomjs.
What can I use instead of PhantomJS?
Just like PhantomJS, we can install Chromium through npm on any OS thanks to the puppeteer package. So Chromium is a great choice for JavaScript unit testing.