问题描述
我正在尝试从某个门户网站获取交易状态,并且我在我的 java 应用程序中使用下面的 chrome 设置,我正在获取
I am trying to get status of transactions from some web portal and I am using below chrome settings in my java application and I am getting
从渲染器接收消息超时:60.000
Timed out receiving message from renderer: 60.000
所有待处理的事务都在超时.
and all the pending transactions are timing out.
会话信息:无头 chrome=68.0.3440.75
驱动程序信息:chromedriver=2.38 (0)
platform=Linux 2.6.32-696.23.1.el6.x86_64 x86_64)
Session info: headless chrome=68.0.3440.75
Driver info: chromedriver=2.38 (0)
platform=Linux 2.6.32-696.23.1.el6.x86_64 x86_64)
我如何处理这个问题,如果发生任何超时,然后转到下一个事务?
How i can handle this and if any timeout is happening then move to next transaction?
我已经尝试了以下语句的所有排列和组合,但仍然无法正常工作;
I have tried all permutation and combinations with below statements but still its not working;
options.addArguments("headless");
options.addArguments("disable-gpu");
WebDriver driver = new ChromeDriver(caps);
TimeUnit.SECONDS.sleep(1);
driver.manage().timeouts().pageLoadTimeout(20, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);
推荐答案
这个错误信息...
Timed out receiving message from renderer: 60.000
...暗示 ChromeDriver 无法启动/生成新的 WebBrowser 即 Chrome 浏览器 会话.
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
您的主要问题是您使用的二进制文件版本之间的不兼容性,如下所示:
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- 您正在使用 chromedriver=2.38
- chromedriver=2.38 的发行说明明确提及以下内容:
支持 Chrome v65-67
- 您正在使用 chrome=68.0
- ChromeDriver v2.41 明确提及以下内容:
- 我们不知道您的 Selenium 客户端 版本.
- 您的 JDK 版本是我们未知的版本.
- Your Selenium Client version is unknown to us.
- Your JDK version is version is unknown to us.
- 将 JDK 升级到最新级别 <强>JDK 8u181.
- 将 Selenium 升级到当前级别版本 3.14.0.
- 将 ChromeDriver 升级到当前的 ChromeDriverv2.41 级别.
- 将 Chrome 版本保持在 Chrome v67-69 级别之间.(根据 ChromeDriver v2.41 发行说明)
- 清理你的项目工作区通过你的IDE和重建你的项目只需要依赖.
- 执行你的
@Test
. - Upgrade JDK to recent levels JDK 8u181.
- Upgrade Selenium to current levels Version 3.14.0.
- Upgrade ChromeDriver to current ChromeDriver v2.41 level.
- Keep Chrome version between Chrome v67-69 levels. (as per ChromeDriver v2.41 release notes)
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
- Execute your
@Test
.
支持 Chrome v67-69
所以 ChromeDriver v2.38 和 Chrome 浏览器 v68.0
这篇关于从渲染器接收消息超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!