PhantomJS WebDriver (currently GhostDriver): the future

Skip to first unread message

Ivan De Marino

Apr 30, 2012, 5:58:51 PM4/30/12
Hi all,

in few days the video of my presentation at the Selenium Conference 2012 should go live.

One of the topic discussed there repeatedly (with both Selenium devs and Browser Manufacturers) is the fact that Selenium DOES NOT WANT to maintain WebDrivers anymore. Browser manufacturers should.

The reasoning:
* Browsers change all the time: tracking their development it makes difficult to be Selenium reliable 100% of the time
* - WebDriver is going undergoing standardization
* Chrome and Opera are leading the way, having taken full responsibility over their browsers (in fact, they are the 2 best drivers)

So, in the future I advocate we integrate a PhantomJS WebDriver INTO phantomjs.
It'd development should continue independent (and maybe outside of the phantomjs codebase), but it's should eventually become part of the PhantomJS distributed binary: ideally, a command line parameter to enable it.

Some might find this "optimistic", but PhantomJS is a "browser", an headless one.
It should be our responsibility to maintain a WebDriver for it.

Current status:
Off course, currently the PhantomJS WebDriver project (GhostDriver - is under heavy development and definitely not finished yet (I plan at having a first Release Candidate by June): I just wanted to start the discussion now.


Ariya Hidayat

Apr 30, 2012, 7:33:12 PM4/30/12
Integrating GhostDriver into PhantomJS sounds reasonable for me. We
can treat it like other third party components: the official external
GhostDriver is for bleeding-edge stuff while PhantomJS (in its latest
release) always gets the snapshot of the latest stable of GhostDriver.
Makes sense?


Ariya Hidayat,

Ivan De Marino

May 1, 2012, 9:24:07 AM5/1/12
Absolute sense. :)

Simon Stewart and the other Selenium maintainers would love it.
Ivan De Marino
Coder, Technologist, Cook, Italian | |


May 1, 2012, 9:50:01 AM5/1/12
I am very interested in the possibility of a WebDriver interface in PhantomJS !
Have any of you looked into ?
Is it working ?
Maybe this could be a source of code and/or inspiration (see ).


Ivan De Marino

May 1, 2012, 9:58:50 AM5/1/12
During the Selenium Conf 2012 I spoke with some Google Test Engineering Team members: webkitdriver was abandoned because
- it required too much work to keep up with webkit
- it was too low level (ex. doing a screenshot was too difficult)
- no one wanted to maintain it

The great thing of PhantomJS is that it lives on it's own: we don't need Selenium.
But we can give definitely make them (and PhantomJS) stronger.

Ivan De Marino

May 11, 2012, 11:17:02 AM5/11/12

I had to open a new Branch of PhantomJS for things needed for GhostDriver to work:

Later on, once GhostDriver is reality and not just a list of commits, I'll work on integrating this branch into PhantomJS.

I promise I'll try to keep changes to a minimum AND to work to make everyone happy once the integration time comes: I want GhostDriver to be an occasion to extend PhantomJS features, but not to change it's nature.
And I don't think I'll need to anyway.

If you want to track what's going on, check out the above mentioned branch or GhostDriver repo on github.



May 11, 2012, 11:34:19 AM5/11/12
Hi Ivan...

Man, talk about pyschic vibes!!! I was just on IRC/Sel with simon
discussing ghostdriver...

I talked to you within the last month or two on IRC, you might not
recall the conversation though.

I discussed the fact that I'm doing a web scrape test, and while I
have a sel test, it's slow. You mentioned ghostdriver, i've done some
research, and ready to take a look at ghostdriver/phantom to see if
this gets a faster/better solution, or if I might have to go to a
casper/phantom combination to see if it would work.

I've got a limited knowledge of building from git, but I'm willing to
put in the grunt work to see if I can make this thing happen..

Here's my need. I have no idea how to build from git. I copied the
latest tarball for phantom, but then you seem to indicate that one
should use your forked phantom to use ghostdriver.

So, if you wouldn't mind walking me through the required steps for
being able to get to the point where I can actually test my sel test,
using phantom as the ff replacement

Steps I need

how to download the phantom fork that you created
how to build it
what other dependencies/apps do I need
(I'm using yum/fedora/centos)
How do I get the ghostdriver app
- is it just git clone git://
and then is it simply copying the files to a given drive.

What do I need to do/replace in my java/sel test code to use ghostdriver/phantom

I realize this is a lot, but If I can get through this, I can post the
steps back to the forum for others to use as well..

I'm really looking to see if this solution will/would speed up the
scraping test for the app.

Also, will ghostdriver actually support the bulk of the
sel/xpath/form/link/select items/issues? Or are there key chunks of
Sel functionality that won't work..



Ivan De Marino

May 11, 2012, 11:39:07 AM5/11/12
to bruce,

well, it's written all over the GitHub page of GhostDriveR: it's not ready.

You won't be able to use it for anything significant for now: too many commands are missing.
There is a link to a spreadsheet that I keep up to date with the commands and their implementation status.

BUT if you want to code, the barries should be low:
- clone phantomjs
- lunch then "" script
- clone ghostdriver
- launch "phantomjes src/main.js"

I NEED to add some form of proper Unit Testing to it, and I want to use the "official" (?if any?) webdriver ones.
I didn't have time to do this yet: too much work on making the commands.

Reply all
Reply to author
0 new messages