Steps to configure PhantomJS GhostDriver with eclipse
Step 1 : Download phantomjs.exe In zip format
First of all you need to download executable "phantomjs.exe" file's zip folder for windows. Go to THIS PAGE and click on "phantomjs-2.0.0-windows.zip" link for windows as shown In bellow Image. It will start downloading the folder.
Step 2 : Extract Zip folder
When completed download, You need to extract zip folder to get executable "phantomjs.exe" file. When you extract zip folder, There will be bin folder Inside It and you will get "phantomjs.exe" file In that bin folder as shown In bellow Image.
Step 3 : Download phantomjsdriver-1.2.1.jar file
You need "phantomjsdriver-1.2.1.jar" file. Go to THIS PAGE and click on phantomjsdriver-1.2.1.jar link to download It.
Step 4 : Add phantomjsdriver-1.2.1.jar file In project's build path
"phantomjsdriver-1.1.0.jar" file will be already available In your projects build path as It Is comes with WebDriver jar files. But If you will execute your WebDriver test on PhantomJS GhostDriver using 1.1.0 version then you will get error like bellow.
To resolve this error, you need to remove "phantomjsdriver-1.1.0.jar" file from project's build path and add "phantomjsdriver-1.2.1.jar" file In project's build path. Latest version will resolve your error. Now configuration part of PhantomJS with eclipse Is over. Next post will describe you how to execute test In headless browser.