本文整理匯總了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'));
}