本文整理汇总了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;未经允许,请勿转载。 |
请发表评论