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


TypeScript by.buttonText方法代码示例

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


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

示例1: it

    it('should close again', async () => {
      await element(by.buttonText('Open sidenav')).click();
      await browser.sleep(50);
      await element(by.buttonText('Open sidenav')).click();

      expect(await sidenav.isDisplayed()).toBeFalsy();
    });
开发者ID:Nodarii,项目名称:material2,代码行数:7,代码来源:sidenav.e2e.spec.ts

示例2: createWallet

  createWallet() {
    element(by.buttonText('New')).click();

    const label = element(by.css('[formcontrolname="label"]'));
    const seed = element(by.css('[formcontrolname="seed"]'));
    const confirm = element(by.css('[formcontrolname="confirm_seed"]'));
    const btnCreate = element(by.buttonText('Create'));
    const seedValidationCheckBox = element(by.css('.-check'));

    label.clear();
    label.sendKeys('Test onboarding wallet');
    seed.clear();
    seed.sendKeys('test test');
    confirm.clear();
    confirm.sendKeys('test test');
    seedValidationCheckBox.click();

    return btnCreate.isEnabled().then(status => {
      if (status) {
        btnCreate.click();
      }

      return status;
    });
  }
开发者ID:skycoin,项目名称:skycoin,代码行数:25,代码来源:onboarding.po.ts

示例3: it

    it('should change steps correctly when stepper button is clicked', async () => {
      const previousButton = element.all(by.buttonText('Back'));
      const nextButton = element.all(by.buttonText('Next'));

      expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
          .toBe('1\nFill out your name');

      screenshot('start');
      nextButton.get(0).click();

      expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
          .toBe('2\nFill out your address');

      await browser.wait(ExpectedConditions.not(
          ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
      screenshot('click next');

      previousButton.get(0).click();

      expect(await element(by.css('mat-step-header[aria-selected="true"]')).getText())
          .toBe('1\nFill out your name');

      await browser.wait(ExpectedConditions.not(
          ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))));
      screenshot('click back');
    });
开发者ID:clydin,项目名称:material2,代码行数:26,代码来源:stepper-e2e.spec.ts

示例4: it

    it('should close again', () => {
      element(by.buttonText('Open sidenav')).click();
      browser.sleep(50);
      element(by.buttonText('Open sidenav')).click();

      expect(sidenav.isDisplayed()).toBeFalsy();
    });
开发者ID:GuzmanPI,项目名称:material2,代码行数:7,代码来源:sidenav-e2e.spec.ts

示例5: it

  it('should support component with inputs and outputs', function () {
    let app = element(by.css('hero-io'));
    let confirmComponent = app.element(by.css('my-confirm'));

    confirmComponent.element(by.buttonText('OK')).click();
    expect(app.element(by.cssContainingText('span', 'OK clicked')).isPresent()).toBe(true);

    confirmComponent.element(by.buttonText('Cancel')).click();
    expect(app.element(by.cssContainingText('span', 'Cancel clicked')).isPresent()).toBe(true);
  });
开发者ID:MarkPieszak,项目名称:angular.io,代码行数:10,代码来源:e2e-spec.ts

示例6: it

		it('Selecting "View Modal" button opens modal window', () => {
			element(by.buttonText('View Modal')).click();
			const title = element(by.css('.modal-title'));
			// Allow time for modal to open
			browser.wait(ExpectedConditions.visibilityOf(title), 10000);
			expect(title.isDisplayed()).toBeTruthy();
			element(by.buttonText('Close')).click();
			// Allow time for modal to close
			// browser.wait(protractor.ExpectedConditions.invisibilityOf(title), 10000);
			browser.sleep(1000);
		});
开发者ID:PaulGilchrist,项目名称:Angular2NodeTemplate,代码行数:11,代码来源:pdf-demo.component.e2e-spec.ts

示例7: it

		it('Changing "Flooring Zones" radio buttons changes SVG floor color for the respective rooms', () => {
			// Default is to have no flooring selected.  Once carpet, tile, or wood is selected, those respective classes will be added to objects in the SVG
			const carpet = element.all(by.buttonText('Carpet'));
			carpet.get(0).click();
			carpet.get(3).click();
			const tile = element.all(by.buttonText('Tile'));
			tile.get(1).click();
			tile.get(4).click();
			const wood = element.all(by.buttonText('Wood'));
			wood.get(2).click();
			wood.get(5).click();
			const carpetedRooms = element.all(by.css('path.carpet'));
			expect(carpetedRooms.count()).toBeGreaterThan(0);
		});
开发者ID:PaulGilchrist,项目名称:Angular2NodeTemplate,代码行数:14,代码来源:floor.component.e2e-spec.ts

示例8: getPageStruct

  function getPageStruct() {
    let hrefEles = element.all(by.css('my-app a'));

    return {
      hrefs: hrefEles,
      routerParent: element(by.css('my-app > ng-component')),
      routerTitle: element(by.css('my-app > ng-component > h2')),

      crisisHref: hrefEles.get(0),
      crisisList: element.all(by.css('my-app > ng-component > ng-component li')),
      crisisDetail: element(by.css('my-app > ng-component > ng-component > ng-component > div')),
      crisisDetailTitle: element(by.css('my-app > ng-component > ng-component > ng-component > div > h3')),

      heroesHref: hrefEles.get(1),
      heroesList: element.all(by.css('my-app > ng-component li')),
      heroDetail: element(by.css('my-app > ng-component > div')),
      heroDetailTitle: element(by.css('my-app > ng-component > div > h3')),

      adminHref: hrefEles.get(2),
      adminPreloadList: element.all(by.css('my-app > ng-component > ng-component > ul > li')),

      loginHref: hrefEles.get(3),
      loginButton: element.all(by.css('my-app > ng-component > p > button')),

      contactHref: hrefEles.get(4),
      contactCancelButton: element.all(by.buttonText('Cancel')),

      outletComponents: element.all(by.css('my-app > ng-component'))
    };
  }
开发者ID:JohnnyQQQQ,项目名称:angular,代码行数:30,代码来源:e2e-spec.ts

示例9: clickYesForConfirmation

 clickYesForConfirmation() {
   let okButton = element(by.css('.metron-dialog')).element(by.buttonText('OK'));
   let maskElement = element(by.className('modal-backdrop'));
   waitForElementVisibility(maskElement)
   .then(() => okButton.click())
   .then(() => waitForElementInVisibility(maskElement));
 }
开发者ID:iraghumitra,项目名称:incubator-metron,代码行数:7,代码来源:tree-view.po.ts

示例10: getPageStruct

  function getPageStruct() {
    const hrefEles = element.all(by.css('app-root > nav a'));
    const crisisDetail = element.all(by.css('app-root > div > app-crisis-center > app-crisis-list > app-crisis-detail > div')).first();
    const heroDetail = element(by.css('app-root > div > app-hero-detail'));

    return {
      hrefs: hrefEles,
      activeHref: element(by.css('app-root > nav a.active')),

      crisisHref: hrefEles.get(0),
      crisisList: element.all(by.css('app-root > div > app-crisis-center > app-crisis-list li')),
      crisisDetail: crisisDetail,
      crisisDetailTitle: crisisDetail.element(by.xpath('*[1]')),

      heroesHref: hrefEles.get(1),
      heroesList: element.all(by.css('app-root > div > app-hero-list li')),
      heroDetail: heroDetail,
      heroDetailTitle: heroDetail.element(by.xpath('*[2]')),

      adminHref: hrefEles.get(2),
      adminPage: element(by.css('app-root > div > app-admin')),
      adminPreloadList: element.all(by.css('app-root > div > app-admin > app-admin-dashboard > ul > li')),

      loginHref: hrefEles.get(3),
      loginButton: element.all(by.css('app-root > div > app-login > p > button')),

      contactHref: hrefEles.get(4),
      contactCancelButton: element.all(by.buttonText('Cancel')),

      primaryOutlet: element.all(by.css('app-root > div > app-hero-list')),
      secondaryOutlet: element.all(by.css('app-root > app-compose-message'))
    };
  }
开发者ID:Cammisuli,项目名称:angular,代码行数:33,代码来源:app.e2e-spec.ts


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