I am trying to run my webdriver test cases using ghostdriver (Phantomjs).I have a maven project ,OS - WIN8, Coding - JAVA 1.7 , Framework : testng6.8.7+maven3 and currently using the latest version of Selenium Webdriver i.e dependency in pom.xml file .
<!-- Selenium Web Driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.43.1</version>
</dependency>
I have tried few PhantomJs dependencies into the pom.xml file But its not compatible with latest version of Wendriver.
<dependency>
<groupId>com.github.klieber</groupId>
<artifactId>phantomjs</artifactId>
<version>1.9.2</version>
</dependency>
I'm not able to import
**import org.openqa.selenium.phantomjs.PhantomJSDriver;
import org.openqa.selenium.phantomjs.PhantomJSDriverService;**
But using phantomJs version 1.0.4 , I'm able to import but that's giving error java.lang.NoClassDefFoundError: org/openqa/selenium/HasInputDevices
So what phantomjs version can i use that would be compatible with latest version of Selenium WebDriver.