本文整理汇总了TypeScript中protractor/globals.protractor.promise.all方法的典型用法代码示例。如果您正苦于以下问题:TypeScript protractor.promise.all方法的具体用法?TypeScript protractor.promise.all怎么用?TypeScript protractor.promise.all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor/globals.protractor.promise
的用法示例。
在下文中一共展示了protractor.promise.all方法的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]
}
});
}
示例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;
});
});
示例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;
})
});
});
示例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'));
});
};
示例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],
}
});
}