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


TypeScript browser.isElementPresent方法代码示例

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


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

示例1: it

  it('Deselect bubble by click on "X", or on the bubble(TC30)', async () => {
    await mapChart.clickOnBubble('green');
    await mapChart.clickXiconOnBubble('USA');

    expect(await browser.isElementPresent(mapChart.selectedCountryLabel)).toBeFalsy();

    await mapChart.clickOnBubble('green');
    expect(await mapChart.selectedCountriesLabels.getText()).toMatch('United States');
    expect(await mapChart.selectedBubbles.get(0).getAttribute('style')).toContain('opacity: 1;');

    await mapChart.deselectBubble('green');

    expect(await browser.isElementPresent(mapChart.selectedCountryLabel)).toBeFalsy();
  });
开发者ID:VS-work,项目名称:gapminder-offline,代码行数:14,代码来源:maps-chart.e2e-spec.ts

示例2: it

  it('should load node children asynchronously', async () => {
    page.navigateTo();

    page.getAsyncChildrenNodeFolding().click();

    const firstAsyncChild = page.getFirstAsyncChild();
    expect(await browser.isElementPresent(firstAsyncChild)).toBe(true);
    expect(await firstAsyncChild.getText()).toEqual('Input Mono');
    expect(await page.getLastAsyncChild().getText()).toEqual('Source Code Pro');
  });
开发者ID:htdong,项目名称:ng2-tree,代码行数:10,代码来源:app.e2e-spec.ts

示例3:

                return modal.isPresent().then(isPresent => {
                    if (isPresent) {
                        console.error('Modal dialog is showed, need to click confirm button');

                        return browser.isElementPresent(confirmButton)
                            .then(isPresent => {
                                if (isPresent) {
                                    console.error('clicking on confirm button');
                                    return confirmButton.click();
                                }
                            }, error => {
                                console.log('error');
                                console.log(error);
                            });
                    }
                });
开发者ID:OndraZizka,项目名称:windup-web,代码行数:16,代码来源:create-project.wf.ts

示例4:

 browser.wait(() => {
     return browser.isElementPresent(connect);
 }, Constants.longWait);
开发者ID:marlonprudente,项目名称:composer,代码行数:3,代码来源:login.ts

示例5: waitForElement

export function waitForElement(selector: string) {
  return browser.isElementPresent(by.css(selector) as ProtractorBy);
}
开发者ID:Daniel-McK,项目名称:material2,代码行数:3,代码来源:query.ts

示例6: waitForElement

export async function waitForElement(selector: string) {
  return await browser.isElementPresent(by.css(selector));
}
开发者ID:Nodarii,项目名称:material2,代码行数:3,代码来源:query.ts

示例7: expectOverlayInFullscreen

 /** Expects the overlay container to be in fullscreen mode. */
 async function expectOverlayInFullscreen() {
   expect(await browser.isElementPresent(by.css('#fullscreen-pane > .cdk-overlay-container')))
     .toBe(true, 'Expected the overlay container to be in fullscreen mode.');
 }
开发者ID:OkBayat,项目名称:material2,代码行数:5,代码来源:fullscreen-e2e.spec.ts

示例8: expectOverlayInBody

 /** Expects the overlay container to be inside of the body element. */
 async function expectOverlayInBody() {
   expect(await browser.isElementPresent(by.css('body > .cdk-overlay-container')))
     .toBe(true, 'Expected the overlay container to be inside of the body.');
 }
开发者ID:OkBayat,项目名称:material2,代码行数:5,代码来源:fullscreen-e2e.spec.ts

示例9: waitForDialog

 function waitForDialog() {
   return browser.isElementPresent(by.css('md-dialog-container') as ProtractorBy);
 }
开发者ID:BernhardRode,项目名称:material2,代码行数:3,代码来源:dialog.e2e.ts


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