[英]SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 77 using Selenium ChromeDriver
[英]org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 75 using Selenium
我想打开显示错误的 Chrome 浏览器。
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Homepage {
public static void main(String[] args) {
// TODO Auto-generated method stub
//Create Driver object
System.setProperty("webdriver.chrome.driver", "C:\\Workdirectory\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
}
}
在这里,我期待我的 Chrome 浏览器,但它引发了一个错误,如
Starting ChromeDriver 75.0.3770.8 (681f24ea911fe754973dda2fdc6d2a2e159dd300-refs/branch-heads/3770@{#40}) on port 21714
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 75
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'DESKTOP-3JIP3OF', ip: '192.168.1.73', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101'
Driver info: driver.version: ChromeDriver
session not created: This version of ChromeDriver only supports Chrome version 75
错误session not created: This version of ChromeDriver only supports Chrome version 75
。 所以存在chrome浏览器版本和chromedriver版本的兼容性问题。 请从以下位置根据您的 chrome 浏览器版本获取适当的 chrome 驱动程序。
这个错误信息...
org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 75
...暗示ChromeDriver v75仅支持Chrome 浏览器 v75 ,而您的系统中不支持该浏览器。
您的主要问题是您使用的二进制文件版本之间的不兼容,如下所示:
支持Chrome 75 版
所以ChromeDriver v75.0和Chrome 浏览器 v74.0之间存在明显的不匹配
@Test
。您可以在以下位置找到相关的详细讨论:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.