本文整理匯總了TypeScript中protractor.protractor.ExpectedConditions.stalenessOf方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript protractor.ExpectedConditions.stalenessOf方法的具體用法?TypeScript protractor.ExpectedConditions.stalenessOf怎麽用?TypeScript protractor.ExpectedConditions.stalenessOf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類protractor.protractor.ExpectedConditions
的用法示例。
在下文中一共展示了protractor.ExpectedConditions.stalenessOf方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('files link in sidebar should have correct count', async () => {
let count = element(by.css('ng-sidebar aside ul li a.files .count')),
emptyLabel = element(by.css('.secondary-sidebar .files .empty')),
filesLink = element(by.css('.primary-sidebar a.files')),
saveBtn = element(by.css('sd-device-toolbar .save')),
saveModal = element(by.css('.save-modal')),
filenameInput = element(by.css('.save-modal input[name="filename"]'));
expect(await count.getText()).toBe('(0)');
filesLink.click();
expect(await emptyLabel.isPresent()).toBe(true);
filesLink.click();
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);
expect(await count.getText()).toBe('(1)');
filesLink.click();
expect(await emptyLabel.isPresent()).toBe(false);
filesLink.click();
browser.executeScript('localStorage.removeItem("zephyrjs-ide.FILES.FILENAME");');
});
示例2: waitForWalletToBeCreated
waitForWalletToBeCreated() {
browser.wait(
protractor.ExpectedConditions.stalenessOf(element(by.css('app-create-wallet'))),
10000,
'Wallet was not created',
);
}
示例3: 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();
});
});
示例4: it
it('should close the viewer on exit', () => {
page.getExitButton().click()
browser.wait(protractor.ExpectedConditions.stalenessOf(page.getImageInsideViewerIfActive(3)), 1000)
browser.wait(protractor.ExpectedConditions.stalenessOf(page.getExitButton()), 1000)
})