(FORK, works with unmodified Qt 5.3) Scriptable Headless WebKit
 
 
 
 
 
 
Go to file
Vitaly Slobodin 016ae98b2b Don't change the URL of the main execution context on exit.
We shouldn't change the URL of the main execution context.
Because this will change security policy of our main frame which leads to the following message: `Unsafe JavaScript attempt to access frame with URL about:blank from frame with URL file://bla.js. Domains, protocols and ports must match.`

We can fix it by isolating main frame of PhantomJS execution context. We can destroy it separately.

https://github.com/ariya/phantomjs/issues/12697
2014-11-16 08:37:37 -08:00
deploy Vagrant setup: Don't clone PhantomJS into Git build directory. 2013-01-09 01:03:27 -08:00
examples Netsniff.js example should exit with an error when fails to load the adress 2013-05-20 00:30:07 -07:00
patches Add a patch to disable touch event support. 2013-03-18 22:00:16 -07:00
rpm Bump version to 1.9.8 and add ChangeLog entry for 1.9.8 2014-10-20 20:55:27 -07:00
src Don't change the URL of the main execution context on exit. 2014-11-16 08:37:37 -08:00
test Bump version to 1.9.8 and add ChangeLog entry for 1.9.8 2014-10-20 20:55:27 -07:00
tools Use bash from PATH rather than hardcoded in /bin. 2013-01-09 00:06:58 -08:00
website Moved to gh-pages branch. 2012-04-11 00:44:40 -07:00
.gitignore Adding the whole 'bin' folder to '.gitignore' 2013-01-29 00:02:23 -06:00
.travis.yml Travis CI: Adding comments to ".travis.yml". 2014-02-02 21:25:51 +00:00
CONTRIBUTING.md Change issue tracker link to point to the new one. 2013-03-16 09:19:25 -07:00
ChangeLog Update ChangeLog for 1.9.8. 2014-10-22 21:27:58 -07:00
LICENSE.BSD Long live PhantomJS! 2010-12-26 19:49:33 -08:00
README.md Issue #10939: Mention 1.9 as the new stable. 2013-03-20 22:38:03 -07:00
build.sh Travis CI: Silent build. 2014-02-02 20:32:47 +00:00
phantomjs.pro Import the old, working prototype. 2010-12-26 20:15:19 -08:00
third-party.txt Update of reference for mongoose license 2013-12-05 07:35:30 -08:00

README.md

PhantomJS - Scriptable Headless WebKit

PhantomJS (www.phantomjs.org) is a headless WebKit scriptable with JavaScript or CoffeeScript. It is used by hundreds of developers and dozens of organizations for web-related development workflow.

The latest stable release is version 1.9 (codenamed "Sakura"). Follow the official Twitter stream @PhantomJS to get the frequent development updates.

Note: Please do not create a GitHub pull request without reading the Contribution Guide first. Failure to do so may result in the rejection of the pull request.

Use Cases

  • Headless web testing. Lightning-fast testing without the browser is now possible! Various test frameworks such as Jasmine, Capybara, QUnit, Mocha, WebDriver, YUI Test, BusterJS, FuncUnit, Robot Framework, and many others are supported.
  • Page automation. Access and manipulate web pages with the standard DOM API, or with usual libraries like jQuery.
  • Screen capture. Programmatically capture web contents, including CSs, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer.
  • Network monitoring. Automate performance analysis, track page loading and export as standard HAR format.

Features

  • Multiplatform, available on major operating systems: Windows, Mac OS X, Linux, other Unices.
  • Fast and native implementation of web standards: DOM, CSS, JavaScript, Canvas, SVG. No emulation!
  • Pure headless (no X11) on Linux, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, Iron.io.
  • Easy to install: Download, unpack, and start having fun in just 5 minutes.

Ecosystem

PhantomJS needs not be used only as a stand-alone tool. Check also some excellent related projects:

  • CasperJS enables easy navigation scripting and common high-level testing.
  • Poltergeist allows running Capybara tests headlessly.
  • Guard::Jasmine automatically tests Jasmine specs on Rails when files are modified.
  • GhostDriver complements Selenium tests with a PhantomJS WebDriver implementation.
  • PhantomRobot runs Robot Framework acceptance tests in the background via PhantomJS.
  • Mocha-PhantomJS run Mocha tests using PhantomJS.

and many others related projects.

Questions?

PhantomJS is free software/open source, and is distributed under the BSD license. It contains third-party code, see the included third-party.txt file for the license information on third-party code.

PhantomJS is created and maintained by Ariya Hidayat (Twitter: @ariyahidayat), with the help of many contributors.