以前脚本运行良好。但是我最近在下面的环境中运行自动化脚本时遇到错误。
操作系统版本:Windows 7
Selenium 版本:selenium-java-2.37.0
驱动程序版本:ChromeDriver 2.8
得到错误如:
Starting ChromeDriver (v2.8.241075) on port 22931
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
现在我的 chrome 浏览器更新到最新版本。所以我尝试下载最新的 selenium 和 chromedriver 版本。我尝试在 env 下使用。
操作系统版本:Windows 7
Selenium 版本:selenium-java-3.7.1
驱动程序版本:ChromeDriver 2.33
Chrome 浏览器:版本 62.0.3202.94(官方版本)(64 位)
但我仍然收到如下错误:
Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146)
at org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:71)
我该如何解决这个问题?
现在问题已解决。我将我的 java 版本更新为 9 并在 env 下使用。
Java 版本:9.0.1
Selenium 版本:selenium-java-3.3.1
驱动程序版本:ChromeDriver 2.33
Chrome 浏览器:版本 62.0.3202.94(官方版本)(64 位)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句