當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript globals.protractor.promise類代碼示例

本文整理匯總了TypeScript中protractor/globals.protractor.promise的典型用法代碼示例。如果您正苦於以下問題:TypeScript protractor.promise類的具體用法?TypeScript protractor.promise怎麽用?TypeScript protractor.promise使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了protractor.promise類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: getFormData

 getFormData() {
   let mainPanel = element.all(by.css('.metron-slider-pane-edit')).last();
   return protractor.promise.all([
     mainPanel.element(by.css('.form-title')).getText(),
     mainPanel.element(by.css('input[name="sensorTopic"]')).getAttribute('value'),
     mainPanel.element(by.css('select[formcontrolname="parserClassName"]')).getAttribute('value'),
     mainPanel.element(by.css('input[formcontrolname="grokStatement"]')).getAttribute('value'),
     mainPanel.all(by.css('div[name="fieldSchema"] table tr')).getText(),
     mainPanel.all(by.css('div[name="threatTriage"] table tr')).getText(),
     mainPanel.element(by.css('input[formcontrolname="index"]')).getAttribute('value'),
     mainPanel.element(by.css('metron-config-number-spinner[name="batchSize"] input')).getAttribute('value'),
     mainPanel.all(by.css('metron-config-advanced-form input')).getAttribute('value')
   ]).then(args => {
     return  {
       title: args[0],
       parserName: args[1],
       parserType: args[2],
       grokStatement: args[3],
       fieldSchemaSummary: args[4],
       threatTriageSummary: args[5],
       indexName: args[6],
       batchSize: args[7],
       advancedConfig: args[8]
     }
   });
 }
開發者ID:JonZeolla,項目名稱:incubator-metron,代碼行數:26,代碼來源:sensor-config.po.ts

示例2:

        return queueForClick.then(() => {
            let promiseArray = [];
            parserNames.map(name => {
                promiseArray.push(this.waitForElement(this.getIconButton(name, waitOnClassName)));
            });

            return protractor.promise.all(promiseArray).then(args => {
                return args;
            });
        });
開發者ID:JonZeolla,項目名稱:incubator-metron,代碼行數:10,代碼來源:sensor-list.po.ts

示例3: element

            return element(by.css('span[data-action=\"'+ dropDownLinkName +'\"]')).click().then(() => {
                let promiseArray = [];
                parserNames.map(name => {
                    promiseArray.push(this.waitForElement(this.getIconButton(name, waitOnClassName)));
                });

                return protractor.promise.all(promiseArray).then(args => {
                    return this.toggleSelectAll().then(() => {
                        return args;
                    })
                });
            });
開發者ID:JonZeolla,項目名稱:incubator-metron,代碼行數:12,代碼來源:sensor-list.po.ts

示例4: _selectLastDayOfCurrentMonth

 /**
  * @private
  * @deprecated Now that datepickers return strings, this complicated logic is not needed.
  * @description
  * Will select the last day of the current month seen on the picker calendar.
  * Does not accept arguments. Set the calendar month yourself with
  * {@link rxDatePicker#month} and {@link rxDatePicker#year} first, so that logic
  * picks the correct date.
  */
 private _selectLastDayOfCurrentMonth(): Promise<void> {
     this.open();
     return protractor.promise.all([
         (this.month as Promise<string>),
         (this.year as Promise<string>),
     ]).then(results => {
         let month = results[0];
         let year = results[1];
         let formattedDate = `${year}-${month}`;
         let lastOfMonth = moment(formattedDate, 'YYYY-MM').endOf('month');
         return this._selectVisibleDate(lastOfMonth.format('YYYY-MM-DD'));
     });
 };
開發者ID:CITguy,項目名稱:encore-ui,代碼行數:22,代碼來源:rxDatePicker.page.ts

示例5: getDropdownActionState

 getDropdownActionState() {
     return protractor.promise.all([
         element.all(by.css('.dropdown.open .dropdown-menu span:not(.disabled)')).count(),
         element.all(by.css('.dropdown.open .dropdown-menu span.disabled')).count(),
         element.all(by.css('.dropdown-menu')).isDisplayed()
     ]).then(args => {
         return  {
             enabled: args[0],
             disabled: args[1],
             displayed: args[2][0],
         }
     });
 }
開發者ID:JonZeolla,項目名稱:incubator-metron,代碼行數:13,代碼來源:sensor-list.po.ts


注:本文中的protractor/globals.protractor.promise類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。