Book Image

PhantomJS Cookbook

By : Rob Friesel
Book Image

PhantomJS Cookbook

By: Rob Friesel

Overview of this book

Table of Contents (15 chapters)
PhantomJS Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. PhantomJS Core Modules

In this chapter, we will cover:

  • Inspecting the version at runtime

  • Managing cookies with the phantom object

  • Specifying a path for external scripts

  • Setting up a global PhantomJS error handler

  • Controlling the exit status of a PhantomJS script

  • Inspecting command-line arguments

  • Inspecting system environment variables

  • Saving a file from a PhantomJS script

  • Reading a file from PhantomJS

  • Creating a custom module for PhantomJS

  • Loading custom modules in PhantomJS