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