PhantomJS WebDriver (currently GhostDriver): the future

2,546 views
Skip to first unread message

Ivan De Marino

unread,
Apr 30, 2012, 5:58:51 PM4/30/12
to phan...@googlegroups.com
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
* http://www.w3.org/2011/08/browser-testing-charter.html - 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 - https://github.com/detro/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.

Ivan

Ariya Hidayat

unread,
Apr 30, 2012, 7:33:12 PM4/30/12
to phan...@googlegroups.com
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?

Regards,


--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat

Ivan De Marino

unread,
May 1, 2012, 9:24:07 AM5/1/12
to phan...@googlegroups.com
Absolute sense. :)

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

blog.ivandemarino.me | www.linkedin.com/in/ivandemarino | twitter.com/detronizator

david

unread,
May 1, 2012, 9:50:01 AM5/1/12
to phan...@googlegroups.com
I am very interested in the possibility of a WebDriver interface in PhantomJS !
Have any of you looked into  http://code.google.com/p/webkitdriver/ ?
Is it working ?
Maybe this could be a source of code and/or inspiration (see  http://code.google.com/p/webkitdriver/wiki/ProgrammerGuide ).

David

Ivan De Marino

unread,
May 1, 2012, 9:58:50 AM5/1/12
to phan...@googlegroups.com
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

unread,
May 11, 2012, 11:17:02 AM5/11/12
to phan...@googlegroups.com
UPDATE:

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.

Ivan

bruce

unread,
May 11, 2012, 11:34:19 AM5/11/12
to detron...@gmail.com, phan...@googlegroups.com
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://github.com/detro/ghostdriver.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..

thanks

-bruce

Ivan De Marino

unread,
May 11, 2012, 11:39:07 AM5/11/12
to bruce, phan...@googlegroups.com
Hi,

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 "build.sh" 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.

Clear?
Reply all
Reply to author
Forward
0 new messages