简体   繁体   English

导入 org.openqa.selenium.webdriver 无法解析

[英]the import org.openqa.selenium.webdriver cannot be resolved

在此处输入图像描述

I have added these jar files as shown below:我添加了这些 jar 文件,如下所示:

在此处输入图像描述

Try to Clean the project by using Menu -> Project -> Clean Cross check if selenium server jars file are added under Build path -> configure build path -> java build path -> library.尝试使用菜单 -> 项目 -> 清理交叉检查 selenium 服务器 jars 文件是否已添加到构建路径 -> 配置构建路径 -> java 构建路径 -> 库下来清理项目。

You can also refer - https://www.selenium.dev/docs/site/en/selenium_installation/ Note - seleniumhq.org is now selenium.dev您也可以参考 - https://www.selenium.dev/docs/site/en/selenium_installation/注意 - seleniumhq.org 现在是 Z8E00596AD8DE2213FF8CZF8D8478D5362

Either keep only selenium-server-standalone-3.141.要么只保留 selenium-server-standalone-3.141。 jar as an external JAR. jar 作为外部 JAR。 Or keep only selenium-java-3.141 Remove all the other Selenium Java Client JARs.或者只保留 selenium-java-3.141 删除所有其他 Selenium Java 客户端 JARs。 Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.通过您的 IDE 清理您的项目工作区,并仅使用所需的依赖项重建您的项目。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 代码运行正常,但突然“无法解析导入的org.openqa.selenium.WebDriver” - Code was working fine but all of a sudden “The import org.openqa.selenium.WebDriver cannot be resolved” org.openqa.selenium.WebDriver 类型不可访问 - The type org.openqa.selenium.WebDriver is not accessible 无法使用 Selenium 和 Java 11 导入 o​​rg.openqa.selenium.WebDriver - Unable to import org.openqa.selenium.WebDriver using Selenium and Java 11 错误:(34、12)java:不兼容的类型:java.lang.String无法转换为org.openqa.selenium.WebDriver - Error:(34, 12) java: incompatible types: java.lang.String cannot be converted to org.openqa.selenium.WebDriver import org.openqa.selenium.chrome无法解析 - The import org.openqa.selenium.chrome cannot be resolved 无法解析“导入org.openqa.selenium.android.AndroidDriver” - The 'import org.openqa.selenium.android.AndroidDriver' cannot be resolved 导入org.openqa.selenium.firefox.FirefoxDriver无法解析 - The import org.openqa.selenium.firefox.FirefoxDriver cannot be resolved 方法公共静态org.openqa.selenium.WebDriver MyTestNG.Baseurl.basic()错误 - Method public static org.openqa.selenium.WebDriver MyTestNG.Baseurl.basic() Error 导入 org.openqa 无法解析 - The import org.openqa cannot be resolved 无法调用“org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)”,因为“this.driver”是 null - Cannot invoke "org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)" because "this.driver" is null
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM