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).
Asked
Active
Viewed 6,343 times
4

Ripon Al Wasim
- 36,924
- 42
- 155
- 176

Mahbub Rahman
- 1,295
- 1
- 24
- 44
-
Are you talking about the Java language bindings? What PhantomJS version did you use (I don't mean the PhantomJS/GhostDriver library version which is 1.2.0 in your case)? – Artjom B. Apr 19 '16 at 18:05
-
Yes, phantomJS for Java – Mahbub Rahman Apr 20 '16 at 01:48
-
And what's your PhantomJS version? Have you tried another? – Artjom B. Apr 20 '16 at 08:39
-
PhantomJS version was 1.2.0. I already mentioned. Your question is not clear to me? – Mahbub Rahman Apr 21 '16 at 05:54
-
[PhantomJS 1.2.0 is extremely old](http://phantomjs.org/releases.html) and you can't even use it with Selenium, because it has no integrated GhostDriver. So you could have a version starting with 1.8. What I mean is the actual PhantomJS binary. Either way, I wanted you to provide a version so that others may help you. I don't care for this issue. – Artjom B. Apr 21 '16 at 06:45
-
If I didn't misunderstand you, I was telling about the phantomJS jar (maven artifact) not the binary. http://repo.maven.apache.org/maven2/com/github/detro/phantomjsdriver/ – Mahbub Rahman Apr 21 '16 at 08:03
-
Are you using Maven? – Ripon Al Wasim Apr 21 '16 at 12:21
-
phantomjs is now discontinued please use jbrowserdirver for headless testing – Mrunal Gosar Apr 21 '16 at 12:28
-
@Ripon Al Wasim Yes. using Maven. – Mahbub Rahman Apr 22 '16 at 01:52
1 Answers
3
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>

Ripon Al Wasim
- 36,924
- 42
- 155
- 176
-
If you use java project instead of maven project set the phantomjsdriver-1.2.1.jar in classpath – Ripon Al Wasim Apr 21 '16 at 12:35
-
1Thanks a lot. It worked for me. I dug the repository and found 1.3.0 in the same repository you mentioned: com.codeborne. http://repo.maven.apache.org/maven2/com/codeborne/phantomjsdriver/. 1.2.1 uses the 2.44.0 and 1.3.0 uses the 2.53.0 – Mahbub Rahman Apr 22 '16 at 01:45
-
I have used phantomjs 1.2.1 with Selenium 2.53.0. It worked for me well. Thanks to mention the version phantomjs1.3.0 – Ripon Al Wasim Apr 22 '16 at 04:53
-
phantomjsdriver 1.2.0 is also working with selenium-java 2.53.0 for me:
com.github.detro phantomjsdriver 1.2.0 -
Yes you can use it but selenium-remote-driver will be replaced with an older version. If you use maven, you can observe it. And than if you instantiate Firefox Driver object, it will generate error. 1.3.0 does not have this problem. – Mahbub Rahman Apr 26 '16 at 02:21
-
-
May be yes. You gave me the repository URL and I just did not check any other repo. :-) – Mahbub Rahman Apr 26 '16 at 06:02