运行我的场景时出现以下错误。
org.openqa.selenium.TimeoutException:超时:接收超时
来自渲染器的消息:10.000
(会话信息:chrome=79.0.3945.79)构建信息:版本:'3.14.0',
修订版:'aacccce0',时间:'2018-08-02T20:19:58.91Z' 系统信息:
主机:'fv-az598',ip:'10.1.0.4',os.name:'Linux',os.arch:'amd64',
os.version: '4.15.0-1064-azure', java.version: '1.8.0_212' 驱动程序
信息:org.openqa.selenium.remote.RemoteWebDriver 功能
{acceptInsecureCerts:假,浏览器名称:chrome,浏览器版本:
79.0.3945.79, 铬合金: {chromedriver版本:79.0.3945.36
正如您所看到的,使用粗体、突出显示的字体,我确实有 chrome 和 chrome 驱动程序的匹配版本。
我还向我的 ChromeOptions 传递了一些参数,这意味着超时方面的帮助:
// options to prevent TIMEOUTS
options.addArguments("start-maximized"); //https://stackoverflow.com/a/26283818/1689770
options.addArguments("enable-automation"); //https://stackoverflow.com/a/43840128/1689770
options.addArguments("--no-sandbox"); //https://stackoverflow.com/a/50725918/1689770
options.addArguments("--disable-infobars"); //https://stackoverflow.com/a/43840128/1689770
options.addArguments("--disable-dev-shm-usage"); //https://stackoverflow.com/a/50725918/1689770
options.addArguments("--disable-browser-side-navigation"); //https://stackoverflow.com/a/49123152/1689770
options.addArguments("--disable-gpu"); //https://stackoverflow.com/questions/51959986/how-to-solve-selenium-chromedriver-timed-out-receiving-message-from-renderer-exc
options.addArguments("--disable-features=VizDisplayCompositor"); //https://stackoverflow.com/questions/55373625/getting-timed-out-receiving-message-from-renderer-600-000-when-we-execute-selen
编辑:在 DOCKER 容器中运行时会发生这种情况(使用 Chrome 浏览器的最新 docker 映像和 node-chrome-debug)
任何想法将不胜感激。
这个错误信息...
org.openqa.selenium.TimeoutException: timeout: Timed out receiving message from renderer: 10.000
...意味着Chrome驱动程序无法启动/产生新的浏览上下文 i.e. Chrome浏览器会议。
你的主要问题是不兼容您正在使用的二进制版本之间的关系如下:
- Your 硒客户端版本是3.14.0 of 2018-08-02T20:19:58.91Z这几乎是1.5年长且同时Chrome驱动程序 was OSS符合。
- 您正在使用chromedriver=79.0
- 您正在使用铬=79.0
- Though chromedriver=79.0 and 铬=79.0是并发的,但它们不兼容硒客户端版本是3.14.0.
所以两者之间存在明显的不匹配硒客户端 v3.14.0 , Chrome驱动程序v79.0和Chrome 浏览器 v79.0
Solution
确保这件事:
-
JDK升级到当前级别JDK 8u222.
-
Selenium升级到当前级别版本 3.141.59.
-
Clean your 项目工作区通过你的IDE and Rebuild您的项目仅具有所需的依赖项。
tl; dr
您可以在以下位置找到一些相关讨论:
- 从渲染器接收消息超时
- 错误 [严重]:在 Jenkins 上通过 Selenium 执行测试套件时,从渲染器接收消息超时:20.000
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)