org.openqa.selenium.webdriver使用硒无法访问错误?

问题描述 投票:0回答:1

我安装了最新的Java 13.0和最新的Selenium版本,收到错误“无法访问org.openqa.selenium.webdriver”,因此将遵从级别从13更改为1.8。

我收到图片中显示的错误:

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9Bb25rVy5wbmcifQ==” alt =“我正在获取图片中显示的错误”>

我安装了最新的Java 13.0和最新的Selenium版本,收到错误“无法访问org.openqa.selenium.webdriver”,因此将遵从级别从13更改为1.8。 >

此错误消息...

org.openqa.selenium.webdriver is not accessible

...表示您的程序无法访问org.openqa.selenium.webdriver


根据您共享的快照,您不应在程序中将类名作为Java

保留,因为它是一个关键字。

解决方案

您需要执行以下任一步骤:

  • class的名称从Java更改为其他名称,例如testJava
  • 或者您可能必须一起删除此程序并创建一个新类,例如testJava

  • tl;医生

    Does Selenium v3.141 support Java 13?

java selenium selenium-webdriver browser java-13
1个回答
0
投票

此错误消息...

org.openqa.selenium.webdriver is not accessible
© www.soinside.com 2019 - 2024. All rights reserved.