---
title: PhantomJS
slug: phantomjs
qid: 
snapshot: enwiki-001334539779
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1334539779
tags: [10637301, 106844792, 116402543, 1868485, 20164444, 23071375, 23603337, 26220375, 35755158, 45928217, 59318958, 71465609]
---

# PhantomJS

> [!note] Provenance
> Snapshot `enwiki-001334539779` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1334539779> · Licensed CC BY-SA 4.0

PhantomJS is a discontinued headless browser used for automating web page interaction. PhantomJS provides a JavaScript API enabling automated navigation, screenshots, user behavior and assertions making it a common tool used to run browser-based unit tests in a headless system like a continuous integration environment. PhantomJS is based on WebKit making it a similar browsing environment to Safari and Google Chrome (before Chrome's fork of WebKit evolved into Blink). It is an open-source software released under the BSD License.

PhantomJS is a discontinued headless browser used for automating web page interaction. PhantomJS provides a JavaScript API enabling automated navigation, screenshots, user behavior and assertions making it a common tool used to run browser-based unit tests in a headless system like a continuous integration environment. PhantomJS is based on WebKit making it a similar browsing environment to Safari and Google Chrome (before Chrome's fork of WebKit evolved into Blink). It is an open-source software released under the BSD License. var page = require('webpage').create(); var url = 'http://en.wikipedia.org/'; page.open(url, function (status) { page.render('wikipedia.org.png'); phantom.exit(); });
