Going headless seems to be all the rage these days, so let's have a look at how we can add
GhostDriver into the mix. We already have pretty much all of the code we need, so this is just going to be a few minor tweaks. Let's start off by updating our POM to bring in a dependency on
<dependency> <groupId>com.codeborne</groupId> <artifactId>phantomjsdriver</artifactId> <version>1.2.1</version> </dependency>
GhostDriver depends upon PhantomJS. This is another binary that most people will not have by default, but that's fine; the
driver-binary-downloader plugin can get it for us.
This is not the official PhantomJSDriver distribution, but it fixes an error that came in with Selenium 2.44.0. Keep an eye on the group ID