PhantomJS与Selenium的版本兼容性 [英] PhantomJS version compatibility with Selenium
本文介绍了PhantomJS与Selenium的版本兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在PhantomJS 1.2.0中使用Selenium WebDriver(也称为Selenium 2)2.53.0. 有什么解决方法吗?我必须使用WebDriver 2.41.0而不是最新版本(2.53.0).
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).
推荐答案
phantomjsdriver-1.2.1.jar与Selenium-2.53.0一起提供.如果phantomjsdriver-1.2.0不适用于Selenium-2.53.0,则可以使用phantomjsdriver-1.2.1. pom.xml的依赖关系代码如下:
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>
这篇关于PhantomJS与Selenium的版本兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文