在Windows7上运行selenium、ghostdriver和phantomJS
我正在使用selenium-2.34和phantomJS-1.9.1-windows 但是,当我尝试使用:在Windows7上运行selenium、ghostdriver和phantomJS,windows,selenium,phantomjs,Windows,Selenium,Phantomjs,我正在使用selenium-2.34和phantomJS-1.9.1-windows 但是,当我尝试使用: import org.openqa.selenium.phantomjs.PhantomJSDriver; import org.openqa.selenium.phantomjs.PhantomJSDriverService; 我可以看出它没有检测到 org.openqa.selenium.phantomjs 获取此错误 The import org.openqa.selenium.
import org.openqa.selenium.phantomjs.PhantomJSDriver;
import org.openqa.selenium.phantomjs.PhantomJSDriverService;
我可以看出它没有检测到
org.openqa.selenium.phantomjs
获取此错误
The import org.openqa.selenium.phantomjs cannot be resolved
我的印象是幽灵驱动程序嵌入了幻影-
有人知道我的设置有什么问题吗
编辑:这可能是由于路径问题,我是否需要为selenium提供一些方法来获取这些信息呢?只需在pom.xml中添加以下内容(如果使用maven):
com.github.detro.ghostdriver
<dependency>
<groupId>com.github.detro.ghostdriver</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.0.3</version>
</dependency>