Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

phantomjsdriver

Matthew Davidson edited this page Mar 16, 2016 · 3 revisions

To use PhantomJS, as with other browsers, you must install it for your platform. Mac OSX Yosmite users should download an unofficial, patched version from here.

As of this writing, if you are able to use the currently most up-to-date version of PhantomJS, you should add the following to your project's dependencies:

:dependencies [[com.codeborne/phantomjsdriver "1.2.1"
                                              :exclusions [org.seleniumhq.selenium/selenium-java
                                                          org.seleniumhq.selenium/selenium-server
                                                          org.seleniumhq.selenium/selenium-remote-driver]]
               [org.seleniumhq.selenium/selenium-java "x.y.z"]]

If you don't add the :exclusions you are likely to see aberrant behavior.

PhantomJS supports JavaScript execution and even screenshots. Read up on PhantomJS' documentation as well as the implementation of the driver (note that this source code is for the 1.2.0 version and under a different group id, but the implementation is much the same and I couldn't find the source code for the com.codeborne artifact).

Clone this wiki locally