Rapid PhantomJS

Build up a solid base for advanced scripting by learning how to write scripts with PhantomJS
3.7 (5 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
77 students enrolled
70% off
Take This Course
  • Lectures 14
  • Length 1.5 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 12/2014 English

Course Description

Rapid PhantomJS will help you to write your own PhantomJS scripts easily in order to perform various testing tasks.

You will begin with a detailed description of the main functionality to build up the base of advanced PhantomJS scripting. You will then move on to learn about the scripting for the four main use cases of PhantomJS, which covers rendering images from any website to avoid visual regression, monitoring network traffic to notice performance degradation, simulating user behavior, and checking the results of your unit testing suite automatically. This is where you will master popular frontend build tools such as make, npm scripting, Grunt, and gulp. These will be set up to help you automate your new developed PhantomJS scripts in any environment.
By the end of the course, you will be able to automate and optimize your workflow with the help of PhantomJS, which leads to higher productivity and products of higher quality.

About the Author

Stefan Judis lives in Berlin and has been developing websites using popular frontend technologies like Grunt, Gulp, RequireJS, and BackboneJS for five years. He fell heavily in love with open source, automation, and tooling. He is the maintainer of two Grunt plugins that are based on PhantomJS, which help avoiding visual regression and making it easier to gain frontend-related performance metrics (grunt-photobox and grunt-phantomas).

What are the requirements?

  • The course starts off with some basic scripting in PhantomJS and then moves on to advanced scripting by writing several example scripts from scratch.

What am I going to get from this course?

  • Learn to write advanced PhantomJS scripts
  • Make use of the phantom object to deal with general PhantomJS functionality
  • Implement a system object to read out system arguments and make your scripts more generic and reusable
  • Monitor the network activity of any website using the webpage object
  • Automate visitor behavior on any website using the evaluate function
  • Execute a frontend unit test suite like Jasmine and retrieve the results
  • Adapt popular frontend build tools to automate your newly gained knowledge of PhantomJS easily

Who is the target audience?

  • Rapid PhantomJS is for web developers who have some existing knowledge of JavaScript and are not afraid of using the command line.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: PhantomJS - Introduction

Explanation of what a browser is and how it works in general. Go to the topic of browser rendering engines and understand what PhantomJS is and which relation exists with WebKit.


It's a headless browser. Demonstration of why this can be useful in many cases by presenting multiple examples.


Explaining two different installation processes for PhantomJS.


Describe and use PhantomJS's phantom API.


Describe and use PhantomJS's system API.


Describing and using PhantomJS's webpage API.

Section 2: Frontend Unit Testing with PhantomJS

Go to the principle of page rendering with PhantomJS by showing and using the webpage object in detail.


Go to the principle of executing JavaScript in the context of a website opened by PhantomJS. This will be used to read out data.


Open a webpage, analyze the markup, and read/print it with PhantomJS.


React to all the loaded assets and figure out how to filter images in order to display them in the command line.


Go into the basic principles of frontend unit testing frameworks and explain implementation with PhantomJS (it's a bit too complex to implement it ourselves).

Section 3: Automating Your Workflow with Included Tests Based on PhantomJS

Make clear which values these tools have and show how easy the usage is.


Make clear how to implement make and npm scripting.


Make clear how to implement grunt and gulp and demonstrate the fairly simple setup.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Packt Publishing, Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.

Ready to start learning?
Take This Course