• <tfoot id='2a44T'></tfoot>
  • <small id='2a44T'></small><noframes id='2a44T'>

    • <bdo id='2a44T'></bdo><ul id='2a44T'></ul>

      <legend id='2a44T'><style id='2a44T'><dir id='2a44T'><q id='2a44T'></q></dir></style></legend>
        <i id='2a44T'><tr id='2a44T'><dt id='2a44T'><q id='2a44T'><span id='2a44T'><b id='2a44T'><form id='2a44T'><ins id='2a44T'></ins><ul id='2a44T'></ul><sub id='2a44T'></sub></form><legend id='2a44T'></legend><bdo id='2a44T'><pre id='2a44T'><center id='2a44T'></center></pre></bdo></b><th id='2a44T'></th></span></q></dt></tr></i><div id='2a44T'><tfoot id='2a44T'></tfoot><dl id='2a44T'><fieldset id='2a44T'></fieldset></dl></div>

        在 cypress 中的 firefox 或 edge 或 chrome 中执行多个规范时出错

        Error when executing multiple specs in firefox or edge or chrome in cypress(在 cypress 中的 firefox 或 edge 或 chrome 中执行多个规范时出错)
      1. <tfoot id='C7T3y'></tfoot>

            <legend id='C7T3y'><style id='C7T3y'><dir id='C7T3y'><q id='C7T3y'></q></dir></style></legend>
              1. <i id='C7T3y'><tr id='C7T3y'><dt id='C7T3y'><q id='C7T3y'><span id='C7T3y'><b id='C7T3y'><form id='C7T3y'><ins id='C7T3y'></ins><ul id='C7T3y'></ul><sub id='C7T3y'></sub></form><legend id='C7T3y'></legend><bdo id='C7T3y'><pre id='C7T3y'><center id='C7T3y'></center></pre></bdo></b><th id='C7T3y'></th></span></q></dt></tr></i><div id='C7T3y'><tfoot id='C7T3y'></tfoot><dl id='C7T3y'><fieldset id='C7T3y'></fieldset></dl></div>

                <small id='C7T3y'></small><noframes id='C7T3y'>

                  <bdo id='C7T3y'></bdo><ul id='C7T3y'></ul>

                    <tbody id='C7T3y'></tbody>
                  本文介绍了在 cypress 中的 firefox 或 edge 或 chrome 中执行多个规范时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  • 确切地说,当我在 firefox 或 edge 或 chrome 浏览器中运行多个规范文件时,不会发生执行.执行停止并出现以下错误
                  <块引用>

                  错误:读取 ECONNRESET在 TCP.onStreamRead (internal/stream_base_commons.js:201:27) { errno: 'ECONNRESET',代码:'ECONNRESET',系统调用:'read'} 错误:阅读 ECONNRESET在 TCP.onStreamRead (internal/stream_base_commons.js:201:27)

                  • 对于 Chrome,即使在 cypress.json 中使用 "chromWebSecurity": false 时,直到 7 - 8 个规格(数量不同),它也会在停止执行后运行并显示以下错误
                  <块引用>

                  无法连接到 Chrome,1 秒后重试(尝试 61/62)

                  <块引用>

                  无法连接到 Chrome,1 秒后重试(尝试 62/62)

                  赛普拉斯未能连接到 Chrome DevTools 协议重试 50 秒后.

                  这通常表示打开 Chrome 浏览器时出现问题.请求的 CDP 端口是 62236.错误详情:错误:找不到 CRI 目标在lazyAssLogic (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
                  esourcesapppackagesserver
                  ode_moduleslazy-assindex.js:110:14)在 Object.lazyAss (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
                  esourcesapppackagesserver
                  ode_moduleslazy-assindex.js:115:28)在 findStartPage (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
                  esourcesapppackagesserverlibrowsersprotocol.js:56:23)

                  使用的配置:

                  柏树:^4.9.0(最新)

                  操作系统:windows7

                  内存:16gb

                  解决方案

                  我找到了以下解决方案

                  解决 Chrome/Edge 问题:禁用 GPU(图形处理单元)

                  在 plugins/index.js 中添加这段代码

                  on('before:browser:launch', (browser, launchOptions) => {if ((browser.name === 'chrome' || browser.name === 'edge') && browser.isHeadless) {launchOptions.args.push('--disable-gpu');返回启动选项}});

                  在 cypress 4.11.0 firefox 问题也解决了

                  • To Be precise, execution is not happening when i run multiple spec files in firefox or edge or chrome browser. execution stops with following error

                  Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:201:27) { errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' } Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:201:27)

                  • For Chrome, even though when using "chromWebSecurity": false in cypress.json, till 7 - 8 specs(number varies) it will run after it stops execution and shows following error

                  Failed to connect to Chrome, retrying in 1 second (attempt 61/62)

                  Failed to connect to Chrome, retrying in 1 second (attempt 62/62)

                  Cypress failed to make a connection to the Chrome DevTools Protocol after retrying for 50 seconds.

                  This usually indicates there was a problem opening the Chrome browser.
                  
                  The CDP port requested was 62236.
                  
                  Error details:
                  
                  Error: could not find CRI target
                      at lazyAssLogic (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
                  esourcesapppackagesserver
                  ode_moduleslazy
                  -assindex.js:110:14)
                      at Object.lazyAss (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
                  esourcesapppackagesserver
                  ode_modulesla
                  zy-assindex.js:115:28)
                      at findStartPage (C:Usersmanojkiran.yerrapotuAppDataLocalCypressCache4.9.0Cypress
                  esourcesapppackagesserverlibrowserspro
                  tocol.js:56:23)
                  

                  Configurations used:

                  cypress: ^4.9.0 (latest)

                  OS: windows7

                  ram: 16gb

                  解决方案

                  I've found following solutions

                  To Solve Chrome/Edge issue: disable GPU (Graphics processing Unit)

                  add this code in plugins/index.js

                  on('before:browser:launch', (browser, launchOptions) => {
                      if ((browser.name === 'chrome' || browser.name === 'edge') && browser.isHeadless) {
                        launchOptions.args.push('--disable-gpu');
                        return launchOptions
                      }
                    });
                  

                  In cypress 4.11.0 firefox issue is also resolved

                  这篇关于在 cypress 中的 firefox 或 edge 或 chrome 中执行多个规范时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Pause youtube video, youtube api(暂停 youtube 视频,youtube api)
                  Youtube iframe api not triggering onYouTubeIframeAPIReady(Youtube iframe api 未触发 onYouTubeIframeAPIReady)
                  How can I stop a video with Javascript in Youtube?(如何在 Youtube 中停止使用 Javascript 的视频?)
                  How to call Greasemonkey#39;s GM_ functions from code that must run in the target page scope?(如何从必须在目标页面范围内运行的代码中调用 Greasemonkey 的 GM_ 函数?)
                  How do you mute an embedded Youtube player?(如何使嵌入式 Youtube 播放器静音?)
                  How to get number of video views with YouTube API?(如何使用 YouTube API 获取视频观看次数?)
                        <bdo id='ngBUQ'></bdo><ul id='ngBUQ'></ul>

                            <tbody id='ngBUQ'></tbody>

                          <tfoot id='ngBUQ'></tfoot>

                          <legend id='ngBUQ'><style id='ngBUQ'><dir id='ngBUQ'><q id='ngBUQ'></q></dir></style></legend>

                            <small id='ngBUQ'></small><noframes id='ngBUQ'>

                          1. <i id='ngBUQ'><tr id='ngBUQ'><dt id='ngBUQ'><q id='ngBUQ'><span id='ngBUQ'><b id='ngBUQ'><form id='ngBUQ'><ins id='ngBUQ'></ins><ul id='ngBUQ'></ul><sub id='ngBUQ'></sub></form><legend id='ngBUQ'></legend><bdo id='ngBUQ'><pre id='ngBUQ'><center id='ngBUQ'></center></pre></bdo></b><th id='ngBUQ'></th></span></q></dt></tr></i><div id='ngBUQ'><tfoot id='ngBUQ'></tfoot><dl id='ngBUQ'><fieldset id='ngBUQ'></fieldset></dl></div>