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


TypeScript ElementFinder.getText方法代码示例

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


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

示例1: it

  it('should query view child', () => {
    expect(result.getText()).toEqual('Selected: 1');

    button.click();

    expect(result.getText()).toEqual('Selected: 2');
  });
开发者ID:AlmogShaul,项目名称:angular,代码行数:7,代码来源:view_child_spec.ts

示例2: it

  it('should query content children', () => {
    expect(resultTopLevel.getText()).toEqual('Top level panes: 1, 2');

    button.click();

    expect(resultTopLevel.getText()).toEqual('Top level panes: 1, 2, 3');
  });
开发者ID:AnthonyPAlicea,项目名称:angular,代码行数:7,代码来源:content_children_spec.ts

示例3: it

    it('should show the correct validity state', () => {
      expect(statusP.getText()).toEqual('Validation status: VALID');

      input.click();
      input.clear();
      input.sendKeys('a');
      expect(statusP.getText()).toEqual('Validation status: INVALID');
    });
开发者ID:Cammisuli,项目名称:angular,代码行数:8,代码来源:simple_form_control_spec.ts

示例4:

                        dirtyGroups.forEach((dirtyGroup) => {
                            let dirtyGroupHeader: ElementFinder = siteLogPage.getGroupHeader(dirtyGroup);
                            dirtyGroupHeader.click();
                            dirtyGroupHeader.getText().then((groupName) => {
                                console.log('    Modified group: ', groupName);
                                browser.waitForAngular();

                                siteLogPage.getDirtyItems(groupName).then((dirtyItems) => {
                                    dirtyItems.forEach((dirtyItem) => {
                                        let dirtyItemHeader: ElementFinder = siteLogPage.getItemHeader(dirtyItem);
                                        dirtyItemHeader.click();
                                        dirtyItemHeader.getText().then((itemName) => {
                                            console.log('        Modified item: ', itemName);
                                        });
                                        browser.waitForAngular();

                                        siteLogPage.getDirtyFields(dirtyItem).then((dirtyFields) => {
                                            dirtyFields.forEach((dirtyField) => {
                                                siteLogPage.getDirtyFieldInput(dirtyField).isPresent().then((isModified: boolean) => {
                                                    if (isModified) {
                                                        siteLogPage.getDirtyFieldLabel(dirtyField).getText().then((fieldName) => {
                                                            console.log('            Modified field: ', fieldName);
                                                        });
                                                    }
                                                });
                                            });
                                        });
                                    });
                                });
                            });
                        });
开发者ID:GeoscienceAustralia,项目名称:gnss-site-manager,代码行数:31,代码来源:all-sites-initial-status.e2e-spec.ts

示例5: it

 it('should display Clickers when Clickers link is selected', () => {
   element(by.css('.bar-button-menutoggle')).click();
   element.all(by.css('ion-label')).first().click();
   clickerField.sendKeys('deal with protractor');
   clickerButton.click();
   expect(clickerList.getText()).toContain('deal with protractor');
 });
开发者ID:BilelKrichen,项目名称:clicker,代码行数:7,代码来源:clickerList.e2e.ts

示例6: expect

  const expectHeroes = (isShown: boolean, ng1HeroCount = 3, statusMessage = 'Ready') => {
    // Verify the show/hide button text.
    expect(showHideBtn.getText()).toBe(isShown ? 'Hide heroes' : 'Show heroes');

    // Verify the `<ng2-heroes>` component.
    expect(ng2Heroes.isPresent()).toBe(isShown);
    if (isShown) {
      expect(ng2HeroesHeader.getText()).toBe('Heroes');
      expect(ng2HeroesExtra.getText()).toBe(`Status: ${statusMessage}`);
    }

    // Verify the `<ng1-hero>` components.
    expect(ng1Heroes.count()).toBe(isShown ? ng1HeroCount : 0);
    if (isShown) {
      ng1Heroes.each(ng1Hero => expect(ng1Hero).toBeAHero());
    }
  };
开发者ID:DeepanParikh,项目名称:angular,代码行数:17,代码来源:static_lite_spec.ts

示例7:

 elements.forEach((element: ElementFinder) => {
     element.getText().then(
         (text: string) => {
             if (text.length > 0) {
                 out.push(text);
             }
         }
     );
 });
开发者ID:GeoscienceAustralia,项目名称:gnss-site-manager,代码行数:9,代码来源:test.utils.ts


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