本文整理汇总了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');
});
示例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);
});
示例3: waitForIonicClickBlock
export async function waitForIonicClickBlock(present: string) {
await browser.wait(EC.presenceOf($(present)), 5000);
await browser.wait(EC.stalenessOf($('.click-block-active')), 5000);
}
示例4:
.then((el) => {
return browser.wait(ExpectedConditions.stalenessOf(element(toast)), timeout, 'still visible');
});
示例5: waitStaleness
export function waitStaleness(element: ElementFinder | ExtendedElementFinder) {
return browser.wait(EC.stalenessOf(element), TIMEOUT, `element ${element.locator().value} not visible`);
}
示例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');
// });
}
示例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('')));
示例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));
}
示例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));
}