【发布时间】:2017-10-01 03:55:26
【问题描述】:
我正在尝试在 maven 项目中使用 Selenium 的最新版本 3.4.0。我使用以下依赖项导入了所有 Selenium 的罐子:-
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
问题是我无法在 Eclipse 的项目中解决 main 方法中以下代码的任何依赖关系:-
public class FirefoxTest {
public static void main(String[] args) {
FirefoxOptions options = new FirefoxOptions();
options.setBinary("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"); //This is the location where you have installed Firefox on your machine
FirefoxDriver driver = new FirefoxDriver(options);
driver.get("http://www.google.com");
}
}
我错过了什么? Eclipse 无法将 FirefoxDriver 类型解析为任何依赖项。请帮忙。
【问题讨论】:
标签: java maven selenium dependencies