In the past I have used selenium 2 and phantomJS with python and there seems to be alot of support out there for that. However I would now like to try this combo using java, has anyone tried this? do I need to use ghostdriver?
The Java binding for GhostDriver is PhantomJSDriver
& that class, plus GhostDriver itself is now part of PhantomJS core as of the 1.9 release. So if you grab that binary (or build from source), you'll already have GhostDriver available.
Also, since GhostDriver extends RemoteWebDriver, you could use it via that class directly instead by passing in a URL, if you don't want to use the custom binding.
We've recently switched over to using PhantomJSDriver
in our tests & it was as simple as changing one class & having phantomjs
available on the classpath. Taking screenshots too without issue.
You can get more info on the Github page for Ghostdriver here. The BaseTest class on the Github repo also gives a good starter for what options you may want to configure for the driver's capabilties (e.g. sensible default SSL settings).