超时从渲染器接收消息:600.000(使用Chrome v73.0,Bamboo Server上的ChromeDriver 2.46) [英] Timed out receiving message from renderer: 600.000 with Chrome v73.0, ChromeDriver 2.46 on Bamboo Server
问题描述
将chrome浏览器升级到73.0硒测试后,在Bamboo构建服务器中无法执行,并且在本地执行时可以正常工作.升级版chromeDriver 2.46的兼容版本.仍然出现错误:
After chrome browser upgraded to 73.0 selenium test are not getting executed in bamboo build server and working fine when executed locally. Upgraded compatible version of chromeDriver 2.46. Still getting error:
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1554111197.266][WARNING]: Timed out connecting to Chrome, retrying...
Apr 01, 2019 5:33:18 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
当前计划已启用强制停止"构建功能.Bamboo要么检测到该构建已挂起,要么已被手动停止.
Force Stop build feature is enabled for current plan. Either Bamboo has detected the build has hung or it has been manually stopped.
下面是用于启动浏览器的代码:
Below is code used to launch browser:
public void selectBrowser(String browser)
{
System.out.println(System.getProperty("os.name"));
if (System.getProperty("os.name").contains("Window")) {
if (browser.equals("chrome")) {
System.out.println(System.getProperty("user.dir"));
System.setProperty("webdriver.chrome.driver",
System.getProperty("user.dir") + "/drivers/chromedriver.exe");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--verbose");
chromeOptions.addArguments("--whitelisted-ips=");
chromeOptions.setPageLoadStrategy(PageLoadStrategy.NONE);
driver = new ChromeDriver(ChromeOptions);
}
}
}
在执行测试期间显示在Bamboo中的错误:
Error displayed in bamboo during test execution:
推荐答案
简短 John Chen (所有者-chromedriver)已确认:
Long Story cut Short John Chen (Owner - chromedriver) have confirmed that:
根本原因确实是在Chrome 73.x中,而不是在ChromeDriver中.我们正在与Chrome开发人员一起寻找解决方案.
The root cause is indeed in Chrome 73.x, not in ChromeDriver. We are working with Chrome devs to find a solution.
解决方案
一种快速解决方案是:
Solution
A quick fix solution will be to:
- 将 Chrome浏览器降级为 Chrome v72.x
- 在以下各项中使用匹配的 ChromeDriver :
- Downgrade Chrome Browser to Chrome v72.x
- Use a matching ChromeDriver among:
- ChromeDriver 2.46
- ChromeDriver 72.0.3626.69
注意:如果您使用的是Chrome版本72,请下载ChromeDriver 2.46或ChromeDriver 72.0.3626.69
Note: If you are using Chrome version 72, please download ChromeDriver 2.46 or ChromeDriver 72.0.3626.69
- 确保将 JDK 升级到通过
ChromeOptions()
的实例添加参数-disable-features = VizDisplayCompositor
似乎可以解决此问题:Adding the argument
--disable-features=VizDisplayCompositor
through an instance ofChromeOptions()
seems solves the issue:ChromeOptions options = new ChromeOptions(); options.addArguments("--disable-features=VizDisplayCompositor"); WebDriver driver = new ChromeDriver(options); driver.get("https://google.com");
Outro
您可以在以下位置找到相关讨论:
Outro
You can find the relevant discussions in:
- Page.captureScreenshot在Selenium下的Chrome 73中不再适用Windows服务
- 错误[SEVERE]:在Jenkins上通过Selenium执行测试套件时,超时从渲染器接收消息:20.000
- 下载Google Chrome 72适用于所有操作系统的脱机安装程序
这篇关于超时从渲染器接收消息:600.000(使用Chrome v73.0,Bamboo Server上的ChromeDriver 2.46)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!