[英]IntelliJ IDEA cannot resolve symbol 'openqa'
下面是导入语句。
import org.apache.commons.lang3.StringUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.StaleElementReferenceException;
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.WebDriver;
下面是添加的依赖项。
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.12.0</version>
</dependency>
Maven 已成功下载所有 Selenium jar。 导入语句仍然显示“无法解析符号 apache”和“无法解析符号 openqa”错误。
在此处下载 jar 文件: https : //www.selenium.dev/downloads/
然后通过File
-> Project Structure
-> Modules
将它们添加到 intellij 中。
单击Dependencies
选项卡。
单击加号+
。
添加从您下载的 zip 中提取的所有 jar,包括lib
文件夹内部和外部的 jar。
全部选择并Apply
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.