本文整理匯總了TypeScript中protractor.protractor.until類的典型用法代碼示例。如果您正苦於以下問題:TypeScript protractor.until類的具體用法?TypeScript protractor.until怎麽用?TypeScript protractor.until使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了protractor.until類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: waitForBootstrap
function waitForBootstrap() {
browser.wait(protractor.until.elementLocated(by.css(selector + ' .box')), 5000)
.then(() => {}, () => {
// jasmine will timeout if this gets called too many times
console.error('>> unexpected timeout -> browser.refresh()');
browser.refresh();
waitForBootstrap();
});
}
示例2: it
it('should greet', () => {
// This test can't wait for Angular as Testability is not available when using WebWorker
browser.ignoreSynchronization = true;
browser.get(URL);
browser.wait(protractor.until.elementLocated(by.css(selector)), 15000);
const elem = element(by.css(selector));
browser.wait(ExpectedConditions.textToBePresentInElement(elem, 'hello world!'), 5000);
expect(elem.getText()).toEqual('hello world!');
});
示例3: waitForBootstrap
function waitForBootstrap() {
browser.wait(protractor.until.elementLocated(by.css(selector + ' h2')), 5000)
.then(
() => {
const elem = element(by.css(selector + ' h2'));
browser.wait(
protractor.ExpectedConditions.textToBePresentInElement(elem, 'Input App'), 5000);
},
() => {
// jasmine will timeout if this gets called too many times
console.error('>> unexpected timeout -> browser.refresh()');
browser.refresh();
waitForBootstrap();
});
}
示例4: waitForBootstrap
function waitForBootstrap(): void {
browser.wait(protractor.until.elementLocated(by.css('todo-app #todoapp')), 15000);
}
示例5: waitForElement
function waitForElement(selector: string): void {
browser.wait(protractor.until.elementLocated(by.css(selector)), 15000);
}