Exception in thread "main" org.openqa.selenium.WebDriverException: disconnected: unable to connect to renderer
查看报错,脚本运行到窗口最大化时出现错误的,经过仔细分析,发现chrom版本是62,与chromedriver不兼容的问题造成的。
解决方法:
去如下网址下载最新的chromedriver:
https://npm.taobao.org/mirrors/chromedriver/
使用Firefox浏览器时只打开浏览器不打开网址时,也可更新geckodriver
下载地址:
https://github.com/mozilla/geckodriver/releases