【发布时间】:2019-02-14 21:11:40
【问题描述】:
我正在使用 Selenium 和 Maven 在 Eclipse 中构建项目,但出现构建错误:找不到 org.openqa.selenium.internal.Locatable 的类文件。
我正在使用Selenium-Server-Standalone 3.141.59,我注意到它在...下有Locatable 类
org.openqa.selenium.**interactions**.Locatable
而不是……
org.openqa.selenium.**internal**.Locatable.
这是完全不同的课程吗?
如何让 Eclipse 识别该类的存在?
请从我的Pom.xml 中找到以下是我的相关依赖项
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>2.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.codeborne/phantomjsdriver -->
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
【问题讨论】: