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

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

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

      • <bdo id='Xheik'></bdo><ul id='Xheik'></ul>
    2. “角度未定义"对存储在 Liferay 中的角度应用程序执行量角器测试时出错

      quot;angular is not definedquot; error while executing Protractor test on angular application stored in Liferay(“角度未定义对存储在 Liferay 中的角度应用程序执行量角器测试时出错)

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

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

              <tfoot id='iJfk7'></tfoot>
                <legend id='iJfk7'><style id='iJfk7'><dir id='iJfk7'><q id='iJfk7'></q></dir></style></legend>
              • <small id='iJfk7'></small><noframes id='iJfk7'>

                本文介绍了“角度未定义"对存储在 Liferay 中的角度应用程序执行量角器测试时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我在 Ubuntu 14.04 虚拟主机上运行,我正在尝试使用 PROTRACTOR 和托管在Liferay"中的应用程序创建一些 E2E 测试.

                i'm running on a Ubuntu 14.04 virtual-host and i'm trying to create some E2E tests with PROTRACTOR for and Application hosted in "Liferay".

                对于登录部分(不需要角度),使用量角器的测试正常,页面登录并正确导航,但是当我尝试在基于 angularjs 的应用程序上打开下拉"菜单时,使用以下内容代码:

                For the login section (that doesn't require angular) the test with protractor are Ok, the page logins and navigates correctly, but when i try to open a "drop-down" menu on the angularjs based app with the following code:

                <select class = "form-control menu-select ng-pristine ng-valid"
                ng-model = "topTitlesData.topFiveDateRange"
                name = "topFiveDateRange"
                ng-options = "range.name for range in        topTitlesData.topFiveDateRangeValues"
                ng-change = "" > < option value = "0" > Last day < /option><option value="1">Last 5 days</option > < option value = "2" > Last 7 days < /option><option value="3">Last 30 days</option > < option value = "4" > last 90 days < /option></select>
                

                我收到了这个错误日志:

                i got this error log:

                UnknownError:未知错误:未定义角度

                UnknownError: unknown error: angular is not defined

                This is the test script on js:
                
                
                describe('pages with login', function() {
                  it('should log in with a non-Angular page and select and option', funcion() {
                    browser.ignoreSynchronization = true;
                    browser.get('***************');
                    element(by.id('_58_login')).clear();
                    element(by.id('_58_login')).sendKeys('*******');
                    expect(element(by.id('_58_login')).getAttribute('value')).toEqual('*****');
                    element(by.id('_58_password')).sendKeys('*****', protractor.Key.ENTER);
                    browser.get('***************');
                    //browser.ignoreSynchronization = false;
                    var selects = element.all(by.model('topTitlesData.topFiveDateRange'));
                    expect(selects.count()).toEqual(5);
                  });
                });

                我想知道,我错过了什么?

                i'm wondering, what am i missing ?

                我已经安装和更新了 nodejs、量角器、webadmin-manager、jdk7.*

                i have nodejs, protractor, webadmin-manager,jdk7.* installed and updated

                推荐答案

                谢谢你,问题是测试没有等到 angular 加载到页面...所以我用"Grunt"、Yeoman"和 Ruby +ruby-compass" gem 并避免使用 liferay.我也设置了

                thank you, the issue was that the tests didn't wait till angular in loaded to the page... so i setup a localhost with the application with "Grunt", "Yeoman" and Ruby + "ruby-compass" gem and avoided liferay. I also setup

                allScriptsTimeout: 5000000,

                在 config.js 文件中,现在测试运行正常.

                in the config.js file and now the tests is running okay.

                这篇关于“角度未定义"对存储在 Liferay 中的角度应用程序执行量角器测试时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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 中使用量角器?)

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

              • <legend id='geh5U'><style id='geh5U'><dir id='geh5U'><q id='geh5U'></q></dir></style></legend>
                <tfoot id='geh5U'></tfoot>
                  <tbody id='geh5U'></tbody>

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