Selenium chromeDriver启动时报错:session not created: This version of ChromeDriver only supports Chrome

问题:

Selenium +JAVA 进行web自动化时,报错

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

java.lang.ExceptionInInitializerError.....
Caused by: org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 76

详细报错信息如下

Selenium chromeDriver启动时报错:session not created: This version of ChromeDriver only supports Chrome_第1张图片

解决方案:

这是因为ChromeDriver与本地chrome浏览器的版本不一致导致

ChromeDriver下载地址:http://npm.taobao.org/mirrors/chromedriver/

 

你可能感兴趣的:(Selenium,selenium)