我在用
Chrome-最新稳定版本61.0.3163.79
Chrome 驱动程序 2.31
硒3.4.0
詹金斯和码头工人
我第一次运行 Jenkins 时出现如下错误:
1.732][INFO]:等待待处理的导航已完成。状态:已断开连接:无法从渲染器 [1.732][DEBUG] 接收消息:
开发工具请求:http://localhost:12059/json http://localhost:12059/json[1.733][调试]:开发工具
请求失败
有人可以帮助我如何解决这个问题吗?
chromeOptions.addArguments(dimension);
chromeOptions.addArguments("--disable-gpu");
chromeOptions.addArguments("--no-sandbox");
chromeOptions.setBinary("/usr/bin/google-chrome");
System.setProperty("webdriver.chrome.driver", "/usr/local/bin/chromedriver");
Logger.getLogger("org.openqa.selenium.remote").setLevel(Level.OFF);
System.setProperty("webdriver.chrome.logfile", "target/chromedriver.log");
ChromeDriverService service =
new ChromeDriverService.Builder().withWhitelistedIps("").withVerbose(true).build();
driver = new ChromeDriver(service, chromeOptions);
driver.get(domain);
还在服务器上安装卷:
/dev/shm:/dev/shm
这解决了我的问题
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)