<tfoot id='jIksf'></tfoot>

    1. <legend id='jIksf'><style id='jIksf'><dir id='jIksf'><q id='jIksf'></q></dir></style></legend>

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

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

      2. 如何配置量角器 (JS) 以在 Microsoft Edge 中运行测试?

        How to configure Protractor (JS) for running tests in Microsoft Edge?(如何配置量角器 (JS) 以在 Microsoft Edge 中运行测试?)
        <i id='jCUg6'><tr id='jCUg6'><dt id='jCUg6'><q id='jCUg6'><span id='jCUg6'><b id='jCUg6'><form id='jCUg6'><ins id='jCUg6'></ins><ul id='jCUg6'></ul><sub id='jCUg6'></sub></form><legend id='jCUg6'></legend><bdo id='jCUg6'><pre id='jCUg6'><center id='jCUg6'></center></pre></bdo></b><th id='jCUg6'></th></span></q></dt></tr></i><div id='jCUg6'><tfoot id='jCUg6'></tfoot><dl id='jCUg6'><fieldset id='jCUg6'></fieldset></dl></div>
        <legend id='jCUg6'><style id='jCUg6'><dir id='jCUg6'><q id='jCUg6'></q></dir></style></legend>

            <bdo id='jCUg6'></bdo><ul id='jCUg6'></ul>
                <tfoot id='jCUg6'></tfoot>

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

                    <tbody id='jCUg6'></tbody>
                • 本文介绍了如何配置量角器 (JS) 以在 Microsoft Edge 中运行测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想将我的 protractor.conf.js 设置为在 Edge 而不是 Chrome 中运行测试.设置这个

                  I want to set my protractor.conf.js to run tests in Edge instead of in Chrome. Setting this

                  capabilities: {
                      'browserName': 'MicrosoftEdge'
                  }
                  

                  导致 SessionNotCreatedError: Unable to create new service: EdgeDriverService 错误代码为 199.我从 Microsoft 的网站,但我不知道如何告诉 Protractor 在哪里可以找到该驱动程序.我尝试将它添加到我的用户路径、系统路径、量角器节点模块文件夹中的 selenium 文件夹,并给出 jvmArgs:seleniumArgs:['-Dwebdriver.edge.driver="<path-to-driver"'],但我仍然得到那个 SessionNotCreatedError.

                  results in SessionNotCreatedError: Unable to create new service: EdgeDriverService with an error code of 199. I downloaded the MicrosoftWebDriver.exe for the version of Edge that I have from Microsoft's website, but I can't figure out how to tell Protractor where to find that driver. I've tried adding it to my user path, my system path, the selenium folder in protractor's node modules folder, and giving a jvmArgs: or seleniumArgs: of ['-Dwebdriver.edge.driver="<path-to-driver"'], but I still get that SessionNotCreatedError.

                  我只编写纯 JavaScript,而不是 Java 或 C#,我希望将所有这些设置为 protractor.conf.js 文件中的属性,而不是在实际的测试文件中设置任何内容.我拥有最新版本的 Node,并且确保在运行 ng e2e 时关闭 Edge.我需要更改或添加什么到我的配置文件才能让它运行?

                  I'm only writing pure JavaScript, no Java or C#, and I want all of this to be set as attributes in the protractor.conf.js file, nothing set in the actual file of tests. I have the most recent version of Node, and I'm making sure to have Edge closed when running ng e2e. What do I need to change or add to my config file to get this to run?

                  从 这个 github 问题,我添加了 seleniumAddress: http://127.0.01:17556/ 到我的配置文件,但现在我收到 ECONNREFUSED 127.0.0.1:17556 错误,错误代码为 135.我从以下地址之一获得该地址关于该 github 问题的评论,但无论手动启动 Edge 驱动程序还是仅运行 ng e2e --config <path-to-config>,我都会收到相同的错误.

                  From this github issue, I added seleniumAddress: http://127.0.01:17556/ to my config file, but now I'm getting an ECONNREFUSED 127.0.0.1:17556 error with error code 135. I got that address from one of the comments on that github issue, but I get the same error regardless of starting the Edge driver manually or just running ng e2e --config <path-to-config>.

                  解决方案
                  seleniumAddress: 'http://localhost:4444/wd/hub' 添加到配置文件中.使用 webdriver-manager start --edge "MicrosoftWebDriver.exe" 手动运行边缘驱动程序,然后在另一个窗口中运行 ng e2e.非常感谢 HaC 提供的解决方案!

                  SOLUTION
                  Add seleniumAddress: 'http://localhost:4444/wd/hub' to the config file. Run the edge driver manually with webdriver-manager start --edge "<path-to-driver>MicrosoftWebDriver.exe", and then run ng e2e in another window. Thank you so much to HaC for this solution!

                  推荐答案

                  参考:https://github.com/angular/protractor/issues/2377

                  1. 下载并安装 Edge 驱动
                  2. 运行 webdriver-manager start --edge "C:path_to_the_driverMicrosoftWebDriver.exe" .默认情况下,这将在端口 4444 上启动您的 selenium 服务器,该端口应该对您开放.
                  3. 在量角器配置文件中:添加 seleniumAddress: 'http://localhost:4444/wd/hub'
                  1. Download and install Edge driver
                  2. Run webdriver-manager start --edge "C:path_to_the_driverMicrosoftWebDriver.exe" . By default this will start your selenium server on port 4444 which should be open to you.
                  3. In your protractor config file: add seleniumAddress: 'http://localhost:4444/wd/hub'

                  这篇关于如何配置量角器 (JS) 以在 Microsoft Edge 中运行测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  What are valid deviceNames for Chrome emulation testing with Protractor?(使用 Protractor 进行 Chrome 模拟测试的有效设备名称是什么?)
                  Protractor Check if Element Does Not Exist(量角器检查元素是否不存在)
                  Protractor e2e Tests Login Redirection(Protractor e2e 测试登录重定向)
                  Explain about async/ await in Protractor(解释 Protractor 中的 async/await)
                  Protractor browser.wait doesn#39;t wait(量角器 browser.wait 不等待)
                  How to use Protractor with Angular 2?(如何在 Angular 2 中使用量角器?)
                    <bdo id='zX7DM'></bdo><ul id='zX7DM'></ul>

                      <tbody id='zX7DM'></tbody>

                  • <tfoot id='zX7DM'></tfoot>

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

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