As the codebase is updated, we hope to keep these documents updated as well. Unless otherwise stated, this documentation currently applies to the latest PhantomJS release: PhantomJS 2.1.1 Assuming PhantomJS is built and its executable is placed somewhere in the PATH, it can be invoked as follows: The script code will be executed as if it running in a web browser with an empty page. Since PhantomJS