當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript protractor.browser類代碼示例

本文整理匯總了TypeScript中aurelia-protractor-plugin/protractor.browser的典型用法代碼示例。如果您正苦於以下問題:TypeScript browser類的具體用法?TypeScript browser怎麽用?TypeScript browser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了browser類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

 it('finds patient with TitelSuffix "unittest"', async () => {
   await login()
   await browser.sleep(2000)
   const inp = element(by.id('$find_search'))
   console.log("found %s",inp)
   await inp.sendKeys('unittest')
   await browser.sleep(1000)
   await element(by.css('button[type="submit"]')).click()
   const t=await inp.getText
   expect(t).toBe("Hallo")
 })
開發者ID:rgwch,項目名稱:webelexis,代碼行數:11,代碼來源:first.e2e.ts

示例2: function

    return browser.wait(async () => {
      await this.pressSubmitButton();

      await browser.wait(ExpectedConditions.alertIsPresent(), 5000);

      return browser.switchTo().alert().then(
        // use alert.accept instead of alert.dismiss which results in a browser crash
        function(alert) { alert.accept(); return true; },
        function() { return false; }
      );
    });
開發者ID:JoshMcCullough,項目名稱:skeleton-navigation,代碼行數:11,代碼來源:welcome.po.ts

示例3: openAlertDialog

  async openAlertDialog() {
    await this.pressSubmitButton();

    await browser.wait(ExpectedConditions.alertIsPresent(), 5000);

    try {
      await browser.switchTo().alert().accept();
      return true;
    } catch (e) {
      return false;
    }
  }
開發者ID:AshleyGrant,項目名稱:skeleton-navigation,代碼行數:12,代碼來源:welcome.po.ts

示例4: it

  it('should automatically write down the fullname', () => {
    po_welcome.setFirstname('Rob');
    po_welcome.setLastname('Eisenberg');

    // For now there is a timing issue with the binding.
    // Until resolved we will use a short sleep to overcome the issue.
    browser.sleep(200);
    expect(po_welcome.getFullname()).toBe('ROB EISENBERG');
  });
開發者ID:JoshMcCullough,項目名稱:skeleton-navigation,代碼行數:9,代碼來源:demo.spec.ts

示例5: function

    return browser.wait(() => {
      this.pressSubmitButton();

      return browser.switchTo().alert().then(
        // use alert.accept instead of alert.dismiss which results in a browser crash
        function(alert) { alert.accept(); return true; },
        function() { return false; }
      );
    });
開發者ID:AshleyGrant,項目名稱:skeleton-navigation,代碼行數:9,代碼來源:welcome.po.ts

示例6: it

  it('should automatically write down the fullname', () => {
    po_welcome.setFirstname('John');
    po_welcome.setLastname('Doe');

    // For now there is a timing issue with the binding.
    // Until resolved we will use a short sleep to overcome the issue.
    browser.sleep(200);
    expect<any>(po_welcome.getFullname()).toBe('JOHN DOE');
  });
開發者ID:StrahilKazlachev,項目名稱:skeleton-navigation,代碼行數:9,代碼來源:demo.spec.ts

示例7: it

  it('should automatically write down the fullname', async () => {
    await poWelcome.setFirstname('John');
    await poWelcome.setLastname('Doe');

    // binding is not synchronous,
    // therefore we should wait some time until the binding is updated
    await browser.wait(
      ExpectedConditions.textToBePresentInElement(
        poWelcome.getFullnameElement(), 'JOHN DOE'
      ), 200
    );
  });
開發者ID:ghiscoding,項目名稱:Realtime-TODO-Aurelia-RethinkDB,代碼行數:12,代碼來源:demo.e2e.ts

示例8: beforeEach

  beforeEach(async () => {
    poSkeleton = new PageObject_Skeleton();
    poWelcome = new PageObject_Welcome();

    await browser.loadAndWaitForAureliaPage(`http://localhost:${config.port}`);
  });
開發者ID:AshleyGrant,項目名稱:cli,代碼行數:6,代碼來源:demo.e2e.ts

示例9: beforeEach

  beforeEach( () => {
    po_skeleton = new PageObject_Skeleton();
    po_welcome = new PageObject_Welcome();

    browser.loadAndWaitForAureliaPage(`http://localhost:19876`);
  });
開發者ID:JoshMcCullough,項目名稱:skeleton-navigation,代碼行數:6,代碼來源:demo.spec.ts


注:本文中的aurelia-protractor-plugin/protractor.browser類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。