當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。