Have a personal or library account? Click to login
PhantomJS Cookbook Cover

PhantomJS Cookbook

Over 70 recipes to help boost the productivity of your applications using real-world testing with PhantomJS

Paid access
|Sep 2025
Product purchase options

Key Features

    Book Description

    A task-based guide that provides solutions to real-world test automation problems. This book is intended for web development professionals who want to integrate PhantomJS into their development and testing workflows. If you are a web developer looking to run automated unit tests while you work, or perhaps you are a QA engineer looking for a fast test automation utility, then this book is perfect for you. Some prior knowledge of JavaScript would be helpful.

    What you will learn

    • Develop your own PhantomJS core modules
    • Learn sophisticated strategies for interacting with web page contents and how to capture those interactions
    • Create a frontend continuous integration (CI) strategy with PhantomJS
    • Perform unit testing with frameworks such as Jasmine, Mocha, and QUnit
    • Implement functional and endtoend testing with PhantomJS using tools such as Selenium, Capybara, and CasperJS
    • Automate performance analysis with libraries such as Confess.js and YSlow
    • Automate the generation of images and PDFs of your web content

    Who this book is for

    Table of Contents

    1. Getting Started with PhantomJS
    2. Using The PhantomJS Core Modules
    3. Working with Webpage Objects
    4. Unit Testing with PhantomJS
    5. Functional and End-to-End Testing with PhantomJS
    6. Network Monitoring and Performance Analysis
    7. Generating Images and Documents with PhantomJS
    8. Continuous Integration with PhantomJS
    PDF ISBN: 978-1-78398-193-9
    Publisher: Packt Publishing Limited
    Copyright owner: © 2014 Packt Publishing Limited
    Publication date: 2025
    Language: English
    Pages: 304