<bdo id='I2XSh'></bdo><ul id='I2XSh'></ul>
  • <legend id='I2XSh'><style id='I2XSh'><dir id='I2XSh'><q id='I2XSh'></q></dir></style></legend>
  • <tfoot id='I2XSh'></tfoot>

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

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

        如何在 Angular 2 中使用量角器?

        时间:2023-06-15

            <tbody id='xPAGI'></tbody>

            • <small id='xPAGI'></small><noframes id='xPAGI'>

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

                  本文介绍了如何在 Angular 2 中使用量角器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 Angular 1.x 中使用 Protractor.我想逐步迁移到 Angular 2.0,但我没有在文档中看到 Protractor /a>.

                  自 Angular 2 以来量角器是否已被删除?我应该在不使用 Protractor 的情况下编写测试,而是使用 Jasmine(或其他)吗?

                  解决方案

                  您可以使用 Protractor 测试 Angular 2 应用程序(从 Protractor 2.5.0 开始).p>

                  对于 Protractor 5.0.0+,您不需要不必做任何具体的事情,Protractor 将自动检测被测应用程序中使用的 Angular 版本.

                  对于 Protractor >= 2.5.0 和 <= 4.0.14,您只需将 useAllAngular2AppRoots: true 添加到您的配置中.这是一个示例.

                  <小时>

                  请注意,一些内置的 Protractor 匹配器尚不能与 Angular2 一起使用,请参阅:

                  • Protractor Angular 2 失败:未知错误:未定义角度

                  Firefox中还有那个Protractor+Angular2的问题(还没解决),见:

                  • 无法运行 Selenium更新到 Angular 2 后通过 Firefox 上的量角器

                  I use Protractor with Angular 1.x. I would like to migrate to Angular 2.0 step by step but I don't see Protractor in the docs.

                  Has protractor been dropped since Angular 2? Should I write my tests without using Protractor, using Jasmine instead (or others)?

                  解决方案

                  You can test Angular 2 applications with Protractor (starting from Protractor 2.5.0).

                  For Protractor 5.0.0+, you don't have to do anything specific, Protractor will auto-detect the Angular version used in the application under test.

                  For Protractor >= 2.5.0 and <= 4.0.14, you would only need to add useAllAngular2AppRoots: true to your config. Here is a sample.


                  Note that several built-in Protractor matchers would not yet work with Angular2, see:

                  • Protractor Angular 2 Failed: unknown error: angular is not defined

                  There is also that Protractor+Angular2 problem in Firefox (still unresolved), see:

                  • Can't run Selenium via Protractor on Firefox after update to Angular 2

                  这篇关于如何在 Angular 2 中使用量角器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用量角器 conf js 测试单独的环境名称? 下一篇:量角器 browser.wait 不等待

                  相关文章

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

                • <tfoot id='FmmvD'></tfoot>
                    <bdo id='FmmvD'></bdo><ul id='FmmvD'></ul>
                • <legend id='FmmvD'><style id='FmmvD'><dir id='FmmvD'><q id='FmmvD'></q></dir></style></legend>