Working with PhantomJS
Now, let's see how PhantomJS's magic works. It is a command-line-based application, so we need to execute it in an OS terminal or console. The PhantomJS package contains a series of files and comes with one main executable file, which is named phantomjs
.
Open your terminal and then navigate to your PhantomJS bin
folder. In the prompt, execute phantomjs
without any arguments.
Tip
PhantomJS Windows build
In Windows build, PhantomJS executable can be found in the root folder with the filename phantomjs.exe
.
Running PhantomJS without any arguments will give you an interactive prompt that is similar to the JavaScript debug console ...
Get Getting Started with PhantomJS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.