[英]Headless chrome: chrome not reachable
I am using Chrome headless to run the protractor test. 我正在使用无头的Chrome来运行量角器测试。 It runs for a while but after that i get the following error.
它运行了一段时间,但之后我收到以下错误。
[15:36:30] E/launcher - chrome not reachable (Session info: headless chrome=59.0.3071.115) (Driver info: chromedriver=2.30.477690 (c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform=Mac OS X 10.11.6 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 5 milliseconds Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
[15:36:30] E /启动器-chrome无法访问(会话信息:headless chrome = 59.0.3071.115)(驱动程序信息:chromedriver = 2.30.477690(c53f4ad87510ee97b5c3425a14c0e79780cdf262),platform = Mac OS X 10.11.6 x86_64)(警告:服务器未提供任何堆栈跟踪信息)命令持续时间或超时:5毫秒生成信息:版本:'3.4.0',修订版:'未知',时间:'未知'
The configuration is as shown below. 配置如下所示。
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['headless', 'disable-gpu']
}
Tests run fine when i run without the 'headless' args. 当我没有“无头”参数时,测试运行正常。
Update capabilities as it shows in the official manual: 更新功能,如官方手册中所示:
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: [ "--headless", "--disable-gpu"]
}
}
You could take a look at Using headless Chrome section 您可以看看使用无头Chrome浏览器部分
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.