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


TypeScript ExpectedConditions.stalenessOf方法代碼示例

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


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

示例1: it

 it('can submit request', () => {
   forgotPasswordPage.usernameInput.sendKeys(constants.expiredUsername);
   forgotPasswordPage.submitButton.click();
   expect<any>(forgotPasswordPage.errors.count()).toBe(0);
   browser.wait(ExpectedConditions.stalenessOf(resetPasswordPage.confirmPasswordInput), constants.conditionTimeout);
   browser.wait(ExpectedConditions.visibilityOf(loginPage.infoMessages.get(0)), constants.conditionTimeout);
   expect<any>(loginPage.username.isDisplayed()).toBe(true);
   expect<any>(loginPage.errors.count()).toBe(0);
   expect<any>(loginPage.infoMessages.count()).toBe(1);
   expect<any>(loginPage.infoMessages.first().getText()).toContain('email sent');
 });
開發者ID:sillsdev,項目名稱:web-languageforge,代碼行數:11,代碼來源:reset-forgotten-password.e2e-spec.ts

示例2: it

      it('can search, select and add language', () => {
        page.modal.selectLanguage.searchLanguageInput.sendKeys(constants.searchLanguage + Key.ENTER);
        expect<any>(page.modal.selectLanguage.languageRows.first().isPresent()).toBe(true);

        expect<any>(page.modal.selectLanguage.addButton.isPresent()).toBe(true);
        expect<any>(page.modal.selectLanguage.addButton.isEnabled()).toBe(false);
        page.modal.selectLanguage.languageRows.first().click();
        expect<any>(page.modal.selectLanguage.addButton.isEnabled()).toBe(true);
        expect<any>(page.modal.selectLanguage.addButton.getText()).toEqual('Add ' + constants.foundLanguage);

        page.modal.selectLanguage.addButton.click();
        browser.wait(ExpectedConditions.stalenessOf(page.modal.selectLanguage.searchLanguageInput),
          constants.conditionTimeout);
        expect<any>(page.modal.selectLanguage.searchLanguageInput.isPresent()).toBe(false);
      });
開發者ID:,項目名稱:,代碼行數:15,代碼來源:

示例3: waitForIonicClickBlock

export async function waitForIonicClickBlock(present: string) {
  await browser.wait(EC.presenceOf($(present)), 5000);
  await browser.wait(EC.stalenessOf($('.click-block-active')), 5000);
}
開發者ID:bitjson,項目名稱:copay,代碼行數:4,代碼來源:utils.ts

示例4:

 .then((el) => {
    return browser.wait(ExpectedConditions.stalenessOf(element(toast)), timeout, 'still visible');
 });
開發者ID:scttcper,項目名稱:toastr-ng2,代碼行數:3,代碼來源:app.po.ts

示例5: waitStaleness

export function waitStaleness(element: ElementFinder | ExtendedElementFinder) {
  return browser.wait(EC.stalenessOf(element), TIMEOUT, `element ${element.locator().value} not visible`);
}
開發者ID:VS-work,項目名稱:gapminder-offline,代碼行數:3,代碼來源:waitHelper.ts

示例6: waitForSpinner

export function waitForSpinner() {
  // return browser.wait(EC.visibilityOf(CommonChartPage.spinner), 3000, 'spinner to be visible').then(() => {
  return browser.wait(EC.stalenessOf(CommonChartPage.spinner), MAX_TIMEOUT, 'stalenessOf of spinner');
  // });
}
開發者ID:VS-work,項目名稱:gapminder-offline,代碼行數:5,代碼來源:helper.ts

示例7:

By.partialButtonText('searchText');
By.repeater('repeatDescriptor');
By.exactRepeater('repeatDescriptor');
By.cssContainingText('cssSelector', 'searchText');
By.options('optionsDescriptor');
By.deepCss('selector');
By.className('className');
By.css('css');
By.id('id');
By.linkText('linkText');
By.js('js');
By.name('name');
By.partialLinkText('partialText');
By.tagName('tagName');
By.xpath('xpath');
ExpectedConditions.not(() => {});
ExpectedConditions.and(() => {});
ExpectedConditions.and(() => {},() => {});
ExpectedConditions.or(() => {});
ExpectedConditions.or(() => {},() => {});
ExpectedConditions.alertIsPresent();
ExpectedConditions.elementToBeClickable(element(by.css('')));
ExpectedConditions.textToBePresentInElement(element(by.css('')), 'text');
ExpectedConditions.textToBePresentInElementValue(element(by.css('')), 'text');
ExpectedConditions.titleContains('title');
ExpectedConditions.presenceOf(element(by.css('')));
ExpectedConditions.stalenessOf(element(by.css('')));
ExpectedConditions.visibilityOf(element(by.css('')));
ExpectedConditions.invisibilityOf(element(by.css('')));
ExpectedConditions.elementToBeSelected(element(by.css('')));
開發者ID:HelloMQL,項目名稱:protractor,代碼行數:30,代碼來源:test_pass.ts

示例8: cancel

 /**
  * Cancels out of the current modal by clicking the "cancel" button.
  */
 cancel(): Promise<void> {
     this.btnCancel.click();
     return browser.wait(EC.stalenessOf(this));
 }
開發者ID:Droogans,項目名稱:encore-ui,代碼行數:7,代碼來源:rxModalAction.page.ts

示例9: submit

 /**
  * Clicks the "submit" button. This isn't exactly what you think it is in a multi-step modal!
  */
 @OverrideWebdriver
 submit(): Promise<void> {
     this.btnSubmit.click();
     return browser.wait(EC.stalenessOf(this));
 }
開發者ID:Droogans,項目名稱:encore-ui,代碼行數:8,代碼來源:rxModalAction.page.ts


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