本文整理汇总了TypeScript中protractor/globals.by.model方法的典型用法代码示例。如果您正苦于以下问题:TypeScript by.model方法的具体用法?TypeScript by.model怎么用?TypeScript by.model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor/globals.by
的用法示例。
在下文中一共展示了by.model方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
return this.isOpen().then(isOpen => {
this.open(); // you have to in order to get to the dropdown
let year = rxSelect.initialize(this.element(by.model('currentYear'))).selectedOption.getText();
// if datepicker was closed before starting, put it back
if (!isOpen) {
this.close();
}
return year;
});
示例2: month
set month(value: AccessorPromiseString) {
this.open();
let dropdownExpectedValue = moment(`2000-${value}`, 'YYYY-MM').format('MMM');
if (dropdownExpectedValue === 'Invalid date') {
throw new Error(
`Unexpected month value for month number "${value}". Months are not zero-indexed!`
);
}
let slowClick = false;
rxSelect.initialize(this.element(by.model('currentMonth'))).select(dropdownExpectedValue, slowClick);
}
示例3: it
it('should greet the named user', () => {
element(by.model('yourName')).sendKeys('Julie');
let greeting = element(by.binding('yourName'));
expect(greeting.getText()).toEqual('Hello Julie!');
});
示例4: year
set year(value: AccessorPromiseString) {
this.open();
let slowClick = false;
rxSelect.initialize(this.element(by.model('currentYear'))).select(value, slowClick);
}