简体   繁体   English

无头铬:铬无法触及

[英]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.

相关问题 GitLab CI无头镀铬 - GitLab CI headless chrome Chrome无法启动(Protractor,Ubuntu,无头) - Chrome failed to start (Protractor, Ubuntu, headless) 在Chrome无头模式下使用Python中的Selenium实现Scrapyng AngularJS - Scrapyng AngularJS with Selenium in Python in Chrome headless mode 使用无头镀铬显示页面的空白部分 - Using headless chrome displays empty part of the page E /启动器-未知错误:Chrome无法启动:在无头模式下崩溃 - E/launcher - unknown error: Chrome failed to start: crashed in headless mode 丢失的UI共享上下文错误-在无头Chrome中运行量角器测试 - Lost UI Shared Context Error - Running protractor tests in headless chrome Sinon.stub在业力,摩卡咖啡中运行,运行Chrome,但并非没有头脑 - Sinon.stub works in karma, mocha with chrome running but not headless 在 Robot Framework 中,页面未在 ubuntu:18.04 的无头 chrome 中完全加载 - In Robot Framework, page is not loading fully in headless chrome in ubuntu:18.04 AngularJS代码可在台式机Chrome中使用,但不能在移动Chrome中使用 - Angularjs code works in desktop chrome, but not in mobile chrome Angular 在 Chrome 中不起作用 - Angular not working in Chrome
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM