Rahman Rahman - 5 months ago 85
Java Question

PhantomJS version compatibility with Selenium

I could not use Selenium WebDriver (a.k.a Selenium 2) 2.53.0 with PhantomJS 1.2.0.
Is there any workaround? I had to use WebDriver 2.41.0 instead of latest version (2.53.0).

Answer

phantomjsdriver-1.2.1.jar is provided with Selenium-2.53.0. If phantomjsdriver-1.2.0 is not worked with Selenium-2.53.0 you can use phantomjsdriver-1.2.1 . Dependency code for the pom.xml should be as below:

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
</dependency>

<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.2.1</version>
</dependency>
Comments