当前位置: 首页>>代码示例>>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;未经允许,请勿转载。