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


TypeScript by.css方法代码示例

本文整理汇总了TypeScript中protractor.by.css方法的典型用法代码示例。如果您正苦于以下问题:TypeScript by.css方法的具体用法?TypeScript by.css怎么用?TypeScript by.css使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在protractor.by的用法示例。


在下文中一共展示了by.css方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: triggerOffsetButton

 triggerOffsetButton(): promise.Promise<any> {
   return this.triggerAButton(by.css('#offsetButton'));
 }
开发者ID:Nolanus,项目名称:ng2-page-scroll,代码行数:3,代码来源:simple-scroll.po.ts

示例2: it

it('should go to nested children', function() {
  element(by.css('.e2eChildNavsNested')).click();
});
开发者ID:Artfloriani,项目名称:ionic,代码行数:3,代码来源:e2e.ts

示例3: getParagraphText

 getParagraphText() {
   return element(by.css('app-root h1')).getText();
 }
开发者ID:vincent314,项目名称:jsrol-ng2,代码行数:3,代码来源:app.po.ts

示例4: getSettinsPageTitleText

 getSettinsPageTitleText(){
   return element(by.tagName('page-settings')).element(by.tagName('ion-title')).element(by.css('.toolbar-title')).getText();
 }
开发者ID:meumobi,项目名称:infomobi,代码行数:3,代码来源:app.po.ts

示例5: getMeetUpCardTitle

 getMeetUpCardTitle() {
   return element(by.css('mat-card-title')).getText();
 }
开发者ID:mehdirazajaffri,项目名称:gator-meetup,代码行数:3,代码来源:app.po.ts

示例6: it

 it('should dissappear when the user clicks cancel button', (() => {
   OperationsHelper.click(element(by.id('welcome_exit')));
   browser.wait(ExpectedConditions.invisibilityOf(element(by.css('.welcome'))), 5000);
 }));
开发者ID:GitWhiskey,项目名称:composer,代码行数:4,代码来源:welcome.spec.ts

示例7: beforeEach

 beforeEach(() => {
   browser.get('/core/di/ts/contentChildren/index.html');
   button = element(by.css('button'));
   result = element(by.css('div'));
 });
开发者ID:AlmogShaul,项目名称:angular,代码行数:5,代码来源:content_children_spec.ts

示例8: beforeEach

 beforeEach(() => {
   browser.get('/forms/ts/simpleForm/index.html');
   inputs = element.all(by.css('input'));
   paragraphs = element.all(by.css('p'));
 });
开发者ID:AlmogShaul,项目名称:angular,代码行数:5,代码来源:simple_form_spec.ts

示例9: describe

describe('Elements', () => {
  const messageInput = element(by.css('input'));
  const popupButtons = element.all(by.css('button'));

  beforeEach(() => browser.get(''));

  describe('popup component', () => {
    const popupComponentButton = popupButtons.get(0);
    const popupComponent = element(by.css('popup-component'));
    const closeButton = popupComponent.element(by.css('button'));

    it('should be displayed on button click', () => {
      expect(popupComponent.isPresent()).toBe(false);

      popupComponentButton.click();
      expect(popupComponent.isPresent()).toBe(true);
    });

    it('should display the specified message', () => {
      messageInput.clear();
      messageInput.sendKeys('Angular rocks!');

      popupComponentButton.click();
      expect(popupComponent.getText()).toContain('Popup: Angular rocks!');
    });

    it('should be closed on "close" button click', () => {
      popupComponentButton.click();
      expect(popupComponent.isPresent()).toBe(true);

      closeButton.click();
      expect(popupComponent.isPresent()).toBe(false);
    });
  });

  describe('popup element', () => {
    const popupElementButton = popupButtons.get(1);
    const popupElement = element(by.css('popup-element'));
    const closeButton = popupElement.element(by.css('button'));

    it('should be displayed on button click', () => {
      expect(popupElement.isPresent()).toBe(false);

      popupElementButton.click();
      expect(popupElement.isPresent()).toBe(true);
    });

    it('should display the specified message', () => {
      messageInput.clear();
      messageInput.sendKeys('Angular rocks!');

      popupElementButton.click();
      expect(popupElement.getText()).toContain('Popup: Angular rocks!');
    });

    it('should be closed on "close" button click', () => {
      popupElementButton.click();
      expect(popupElement.isPresent()).toBe(true);

      closeButton.click();
      expect(popupElement.isPresent()).toBe(false);
    });
  });
});
开发者ID:DeepanParikh,项目名称:angular,代码行数:64,代码来源:app.e2e-spec.ts

示例10: triggerToTopWithSpeedButton

 triggerToTopWithSpeedButton(): promise.Promise<any> {
   return this.triggerAButton(by.css('#toTopWithSpeed'));
 }
开发者ID:Nolanus,项目名称:ng2-page-scroll,代码行数:3,代码来源:simple-scroll.po.ts


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