Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ghost Driver is an implementation of the Remote WebDriver Wire protocol, using PhantomJS as back-end
tree: 7fb628cc19

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
test
tools
.gitignore
DO_NOT_READ_THIS_PRIVATE_AND_CONFIDENTIAL.md
LICENSE.BSD
README.md

README.md

Ghost Driver

Ghost Driver is a pure JavaScript implementation of the WebDriver Wire Protocol for PhantomJS. It's going to be a Remote WebDriver that uses PhantomJS as back-end.

Status

  • Under development / almost ready for 1.0
  • Code Hardening in progress: before raising bugs, check if's a "not yet implemented" feature first
  • ~90% of the WireProtocol currently implemented
  • Version 1.0 will implement all the commands EXCEPT the ones related with Mobile WebDrivers (see spreadsheet below)
  • DEPENDS ON MY BRANCH OF PHANTOMJS, as mentioned below in the Requirements section

You can monitor development progress at this Google Spreadsheet.

Presentation and Slides

In April 2012 I (Ivan De Marino) presented GhostDriver at the Selenium Conference: slides and video.

Requirements

How to use it

Check out the ghostdriver-dev branch of PhantomJS, and build it (I assume you know Git).

There is plenty to do before this is usable, but if you can't wait to try PhantomJS's speed when it acts as a RemoteWebDriver Server, do the following:

  1. Start GhostDriver on a terminal:

    $> phantomjs ghostdriver/src/main.js
    Ghost Driver running on port 8080
  2. Build and Launch the test suite (written in Java, built with Gradle):

    $> cd ghostdriver/test
    $> ./gradlew test
  3. Register ghost driver with a selenium grid hub

    # launch the grid server, which listens on 4444
    $> java -jar /path/to/selenium-server-standalone-2.25.0.jar -role hub
    # register with hub
    $> phantomjs ghostdriver/src/main.js 8080 http://127.0.0.1:4444

    Now you can use your normal webdriver client with http://127.0.0.1:4444 and just request browserName: phantomjs!

    Note that simply point your webdriver client to the port GhostDriver listens to also works.

Reasoning: pros and cons

Pros of using an Headless browser for your Selenium testing

  • Speed: makes development faster
  • Speed: makes THE developer happier
  • Speed: makes leaves more time for beer, video-games, cycling or whatever you fancy
  • ...

Cons of using an Headless browser for your Selenium testing

  • PhantomJS is not a "Real" Browser, but "just" very very close to one

Contributions

You can contribute testing it and reporting bugs and issues, or submitting Pull Requests. Any help is welcome, but bear in mind the following base principles:

  • Squash your commits by theme: I prefer a clean, readable log
  • Maintain consistency with the code-style you are surrounded by
  • If you are going to make a big, substantial change, let's discuss it first

License

GhostDriver is distributed under BSD License.

Something went wrong with that request. Please try again.