本文整理汇总了TypeScript中protractor.by.binding方法的典型用法代码示例。如果您正苦于以下问题:TypeScript by.binding方法的具体用法?TypeScript by.binding怎么用?TypeScript by.binding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor.by
的用法示例。
在下文中一共展示了by.binding方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
util.findRowByText(textPage.questionRows, constants.testText1Question1Title).then(row => {
expect<any>(typeof row === 'undefined').toBeFalsy();
const answerCount = row.element(by.binding('question.answerCount'));
const responseCount = row.element(by.binding('question.responseCount'));
expect<any>(answerCount.getText()).toBe('1');
expect<any>(responseCount.getText()).toBe('2');
});
示例2: it
it('should add numbers', () => {
element(by.model('first')).sendKeys('4');
element(by.model('second')).sendKeys('5');
element(by.id('gobutton')).click();
expect(element(by.binding('latest')).getText()).toEqual('9');
});
示例3: constructor
constructor() {
this.first_operand = element(by.model('first'));
this.second_operand = element(by.model('second'));
this.operator = (optor:string) => {
return element(by.cssContainingText('option',optor));
}
this.go_button = element(by.id('gobutton'));
this.result = element(by.binding('latest'));
}
示例4: beforeEach
beforeEach(() => {
showHideBtn = element(by.binding('toggleBtnText'));
ng2Heroes = element(by.css('.ng2-heroes'));
ng2HeroesHeader = ng2Heroes.element(by.css('h1'));
ng2HeroesExtra = ng2Heroes.element(by.css('.extra'));
ng2HeroesAddBtn = ng2Heroes.element(by.buttonText('Add Hero'));
ng1Heroes = element.all(by.css('.ng1-hero'));
});
示例5: it
it('should redisplay change to phone when submitted', () => {
// when
const input = element(by.model('ctrl.user.phone'));
input.clear();
input.sendKeys('4575157');
const submitBtn = element(by.css('button.waves-effect'));
submitBtn.click();
// then
expect(element(by.binding('ctrl.displayUser.phone')).getText()).toBe('4575157');
});
示例6: it
it('should display the `nexus-s` page', function() {
expect(element(by.binding('$ctrl.phone.name')).getText()).toBe('Nexus S');
});
示例7: shownItems
/**
* The ElementFinder for the "Showing x-y of z items" text.
*
* @example
*
* it('should always show that there are 50 states', () => {
* var pagination = new encore.rxPaginate($('rx-pagination'));
* expect(pagination.shownItems.getText()).to.eventually.eql('Showing 1-20 of 50 items');
* pagination.changePageSize(50);
* expect(pagination.shownItems.getText()).to.eventually.eql('Showing 50 items');
* });
*/
get shownItems(): ElementFinder {
return this.element(by.binding('pageTracking'));
}