无法org.openqa.selenium.WebDriver使用Selenium和Java 11导入

reyrro:

我是新来硒的webdriver和java编程。试图解决错误的日食2018-12“的进口org.openqa.selenium.WebDriver解决不了”我现在用java 11,硒独立服务器3.141.59。请帮助。我对进口的jar文件无法以下是截图

在这里输入图像描述

在这里输入图像描述

DebanjanB:

As per Can't compile Java9 module with selenium-java as dependency it seems the Selenium packages can't be compiled with Java 9 due to split packages and till May 15, 2018 Selenium wasn't fully compatible with Java 9.

But as per this comment @Jarob22 mentioned, Selenium works just fine using Java 10. Java 9 is already eol and there's not much point adding extra stuff to try and support just it if 10 works.

But with the landing of e57914a Simon introduced us with basic JPMS support. With this availability (mhomnag/selenium-java10-reproducer@bc63889) now actually builds but you may have to Remove the WebDriverWaiter and just use a sleep for now.


Java 11

As you are using java.version: '11.0.1', selenium-server-standalone-3.141.59.jar is still not compatible with Java 11. But once Java 11 ships and Buck supports it the toolchain witll be rejiged to support Java 11.


Solution

战略解决方法是将安装最新版本的JDK 8u212并执行@Tests

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

org.openqa.selenium.remote.UnreachableBrowserException:无法使用Java使用Selenium和IE11启动新的会话错误

代码工作正常,但突然“无法解析导入 org.openqa.selenium.WebDriver”

无法解析类参考org / openqa / selenium / WebDriver

错误:无法解析类引用org / openqa / selenium / WebDriver

org.openqa.selenium.InvalidCookieDomainException:使用Selenium和WebDriver禁止文档访问Cookie

org.openqa.selenium.NoSuchElementException

在Maven项目中,文件夹src / main / java中的类无法解析导入org.openqa.selenium.WebElement

java.lang.ClassCastException:类org.openqa.selenium.By $ ByXPath无法转换为类org.openqa.selenium.WebElement

org.openqa.selenium.NoSuchElementException:无法找到元素错误

org.openqa.selenium.ElementNotInteractableException:无法单击元素

无法找到元素:org.openqa.selenium.NoSuchElementException

Selenium Java 4.1.3 java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver

org.openqa.selenium.remote.UnreachableBrowserException: - 错误 selenium Java TestNG

Java中的Selenium Grid:org.openqa.selenium.SessionNotCreatedException:无效参数:无法杀死已退出的进程

获取异常 org.openqa.selenium.SessionNotCreatedException

引起:org.openqa.selenium.InvalidSelectorException:

Firefox-org.openqa.selenium.interactions.MoveTargetOutOfBoundsException

net.thucydides.core.webdriver.UnsupportedDriverException:无法实例化org.openqa.selenium.firefox.FirefoxDriver类

org.openqa.selenium.WebDriverException:未知错误:无法通过Java通过ChromeDriver Chrome和Selenium集中元素

导入org.openqa.selenium。尽管有maven依赖项但未找到

OpenQA.Selenium.WebDriverException Firefox无法启动

Selenium程序引发编译错误org.openqa.selenium.internal.Killable无法解决

org.openqa.selenium.WebDriverException:断开连接:使用ChromeDriver未连接到DevTools错误Chrome使用Selenium和Java

Selenium Actions.movetoElement-org.openqa.selenium.UnsupportedCommandException

Selenium 错误 - org.openqa.selenium.SessionNotCreatedException 会话创建异常

MAC-Selenium-java 3.0.1使用chromedriver提供java.lang.NoClassDefFoundError:org / openqa / selenium / NoSuchSessionException

org.openqa.selenium.ElementClickInterceptedException:在无头模式下使用Selenium和Java元素单击被拦截的错误

org.openqa.selenium.WebDriverException:java.io.IOException异常

使用Selenium Java测试用例调用CLICK时获取“ org.openqa.selenium.ElementClickInterceptedException”