哪种语言做网站,朱子网站建设,网络营销创意案例,宁波高端网站开发由于最近自动化频频更新导致出现各种问题#xff0c;因此在创建驱动对象代码时改成这种方式 我最近就遇到了由于更新而导致的代码报错#xff0c;报错信息如下#xff1a; 复制内容如下#xff1a; Exception in thread “main” org.openqa.selenium.remote.http.Connecti… 由于最近自动化频频更新导致出现各种问题因此在创建驱动对象代码时改成这种方式 我最近就遇到了由于更新而导致的代码报错报错信息如下 复制内容如下 Exception in thread “main” org.openqa.selenium.remote.http.ConnectionFailedException: Unable to establish websocket connection to http://localhost:60260/devtools/browser/11657e32-5667-4bd3-bfb1-f94dc49373a0
原来的代码
ChromeDriver driver new ChromeDriver(options);使用edge浏览器
EdgeOptions options new EdgeOptions();
options.addArguments(--remote-allow-origins*);
EdgeDriver driver new EdgeDriver(options);使用Chrome浏览器
ChromeOptions options new ChromeOptions();
options.addArguments(--remote-allow-origins*);
ChromeDriver driver new ChromeDriver(options);