本文整理汇总了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)
})