当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript by.binding方法代码示例

本文整理汇总了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');
 });
开发者ID:sillsdev,项目名称:web-languageforge,代码行数:7,代码来源:text.e2e-spec.ts

示例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');
  });
开发者ID:angular,项目名称:protractor-cookbook,代码行数:7,代码来源:spec.ts

示例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'));
 }
开发者ID:angular,项目名称:protractor-cookbook,代码行数:9,代码来源:calcPage.ts

示例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'));
  });
开发者ID:DeepanParikh,项目名称:angular,代码行数:10,代码来源:static_lite_spec.ts

示例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');
        });
开发者ID:ccrowhurstram,项目名称:ram-protractor-training,代码行数:12,代码来源:exercise1.spec.ts

示例6: it

 it('should display the `nexus-s` page', function() {
   expect(element(by.binding('$ctrl.phone.name')).getText()).toBe('Nexus S');
 });
开发者ID:AnthonyPAlicea,项目名称:angular,代码行数:3,代码来源:e2e-spec.ts

示例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'));
 }
开发者ID:Droogans,项目名称:encore-ui,代码行数:15,代码来源:rxPaginate.page.ts


注:本文中的protractor.by.binding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。