当chromedriver与chrome版本不匹配时,我收到以下错误。
org.openqa.selenium.WebDriverException: unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot find context with specified id"}
(会话信息:chrome = 64.0.3282.186) 有没有办法通过不手动操作来切换基于chrome版本的chromedriver版本。它应该使用java程序检测基于chrome的版本。因为我在具有不同chrome版本的多台机器上执行测试。
请在下面找到chromedriver兼容性的发布链接版本 ChromeDriver release notes
先谢谢。
答案 0 :(得分:0)
我们可以切换到相应的Chrome浏览器&镀铬驱动器。您可以按照以下方式实施。
注意:要运行bat文件,请使用Runtime API