當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript protractor.ElementFinder類代碼示例

本文整理匯總了TypeScript中protractor.ElementFinder的典型用法代碼示例。如果您正苦於以下問題:TypeScript ElementFinder類的具體用法?TypeScript ElementFinder怎麽用?TypeScript ElementFinder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ElementFinder類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: describe

  describe('different timings', () => {

    let host: ElementFinder;

    beforeEach(() => {
      host = element(by.css('app-hero-list-timings'));
    });

    it('adds and removes element', () => {
      addInactiveHero();

      let li = host.element(by.css('li'));
      expect(li.getCssValue('transform')).toMatch(NO_TRANSFORM_MATRIX_REGEX);
      expect(li.getCssValue('opacity')).toMatch('1');

      removeHero();
      expect(li.isPresent()).toBe(false);
    });

  });
開發者ID:AnthonyPAlicea,項目名稱:angular,代碼行數:20,代碼來源:app.e2e-spec.ts

示例2: describe

  describe('opening and closing', () => {
    let sidenav: ElementFinder;

    beforeEach(() => {
      browser.get('/sidenav');
      sidenav = element(by.tagName('md-sidenav'));
    });

    it('should be closed', () => {
      expect(sidenav.isDisplayed()).toBeFalsy();
    });

    it('should open', () => {
      element(by.buttonText('Open sidenav')).click();
      expect(sidenav.isDisplayed()).toBeTruthy();
    });

    it('should close again', () => {
      element(by.buttonText('Open sidenav')).click();
      element(by.buttonText('Open sidenav')).click();
      expect(sidenav.isDisplayed()).toBeFalsy();
    });
  });
開發者ID:MartinMa,項目名稱:material2,代碼行數:23,代碼來源:sidenav-e2e.spec.ts

示例3: getOffsetWidth

 function getOffsetWidth(el: ElementFinder): promise.Promise<number> {
   return browser.executeScript(
     'return arguments[0].offsetWidth',
     el.getWebElement()
   );
 }
開發者ID:angularbrasil,項目名稱:angular,代碼行數:6,代碼來源:app.e2e-spec.ts

示例4: it

    it('should fill the memory with past results', () => {
      first.sendKeys('1');
      second.sendKeys('1');
      goButton.click();

      first.sendKeys('10');
      second.sendKeys('20');
      goButton.click();

      let memory = element.all(by.repeater('result in memory').
          column('result.value'));
      memory.then((arr) => {
        expect(arr.length).toEqual(2);
        expect(arr[0].getText()).toEqual('30'); // 10 + 20 = 30
        expect(arr[1].getText()).toEqual('2'); // 1 + 1 = 2
      },
      // TODO: remove optional error fn
      () => {});
    });
開發者ID:angular,項目名稱:protractor-cookbook,代碼行數:19,代碼來源:spec.ts

示例5:

 .then(() => {
     return elm.click();
 });
開發者ID:bloonbullet,項目名稱:composer,代碼行數:3,代碼來源:operations-helper.ts

示例6: getTimeElement

 getTimeElement(time: Number) {
   console.error(`[data-value=${time}]`);
   return this.dtp.element(by.css(`[data-value="${time}"]`));
 }
開發者ID:vir-c,項目名稱:angular-bootstrap-datetimepicker,代碼行數:4,代碼來源:dl-date-time-picker.po.ts

示例7: it

 it('should delete a Clicker', () => {
   removeButton.click();
   element.all(by.className('clickerList')).count()
     .then((count) => expect(count).toEqual(0));
 });
開發者ID:android-sos,項目名稱:clicker,代碼行數:5,代碼來源:clickerList.e2e.ts

示例8:

 'test clicker one'.split('').forEach((c) => clickerField.sendKeys(c));
開發者ID:android-sos,項目名稱:clicker,代碼行數:1,代碼來源:clickerList.e2e.ts

示例9: fillForm

 private fillForm(email, password) {
   this.searchElements();
   this.email.sendKeys(email);
   this.password.sendKeys(password);
 }
開發者ID:AgoraBinaria,項目名稱:cash-flow,代碼行數:5,代碼來源:user-login.po.ts

示例10: it

 it('should populate the form control values in the DOM', () => {
   expect(firstInput.getAttribute('value')).toEqual('Nancy');
   expect(lastInput.getAttribute('value')).toEqual('Drew');
 });
開發者ID:AlmogShaul,項目名稱:angular,代碼行數:4,代碼來源:simple_form_group_spec.ts


注:本文中的protractor.ElementFinder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。