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


TypeScript protractor.protractor.ExpectedConditions類代碼示例

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


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

示例1: it

    it('deleting a file should work', async () => {
        let saveBtn = element(by.css('sd-device-toolbar .save')),
            filesLink = element(by.css('.primary-sidebar a.files')),
            saveModal = element(by.css('.save-modal')),
            filenameInput = element(by.css('.save-modal input[name="filename"]')),
            count = element(by.css('.primary-sidebar a.files .count'));

        // Save file
        saveBtn.click();
        browser.wait(protractor.ExpectedConditions.visibilityOf(saveModal), 1000);
        expect(await saveModal.isDisplayed()).toBe(true);
        filenameInput.sendKeys('FILENAME');
        filenameInput.sendKeys(protractor.Key.ENTER);
        browser.wait(protractor.ExpectedConditions.stalenessOf(element(by.css('.modal-backdrop'))), 1000);

        // Open sidebar
        filesLink.click();

        // Click delete button
        element(by.css('.secondary-sidebar .files .delete')).click();

        expect(await count.getText()).toBe('(0)');
        browser.executeScript('localStorage.removeItem("zephyrjs-ide.FILES.FILENAME");');
        // Close sidebar
        filesLink.click();

        // Close tab
        let closeTabBtn = element(by.css('#tab-bar .nav-item.active .close-tab'));
        closeTabBtn.click();
    });
開發者ID:baleboy,項目名稱:zephyrjs-ide,代碼行數:30,代碼來源:editor.component.e2e-spec.ts

示例2: waitForWalletToBeCreated

 waitForWalletToBeCreated() {
   browser.wait(
     protractor.ExpectedConditions.stalenessOf(element(by.css('app-create-wallet'))),
     10000,
     'Wallet was not created',
   );
 }
開發者ID:skycoin,項目名稱:skycoin,代碼行數:7,代碼來源:wallets.po.ts

示例3: hideTransactionModal

  hideTransactionModal() {
    const el = element(by.css('app-transaction-detail .-header img'));

    return browser.wait(protractor.ExpectedConditions.visibilityOf(el), 5000).then(() => el.click().then(() => {
      return this.getTransactionDetailIsShow();
    }));
  }
開發者ID:skycoin,項目名稱:skycoin,代碼行數:7,代碼來源:transactions.po.ts

示例4: element

 return btn.click().then(() => {
   return browser.wait(
     protractor.ExpectedConditions.stalenessOf(element(by.css('app-password-dialog'))),
     30000,
     'Can not decrypt wallet',
   ).then(() => {
     return element(by.css('.-enable-encryption')).isPresent();
   });
 });
開發者ID:skycoin,項目名稱:skycoin,代碼行數:9,代碼來源:wallets.po.ts

示例5: getLazyLoadedText

 getLazyLoadedText() {
   const el = element(by.css('app-root lazy-component'));
   return browser.wait(protractor.ExpectedConditions.presenceOf(el)).then(() => el.getText(), err => el.getText());
 }
開發者ID:BobChao87,項目名稱:angular,代碼行數:4,代碼來源:app.po.ts

示例6: waitForClickable

 static waitForClickable(element: ElementFinder) {
     return browser.wait(protractor.ExpectedConditions.elementToBeClickable(element));
 }
開發者ID:Margi47,項目名稱:DanceSchoolCrm,代碼行數:3,代碼來源:time.helper.ts


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