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