本文整理匯總了TypeScript中protractor/globals.browser.wait方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript browser.wait方法的具體用法?TypeScript browser.wait怎麽用?TypeScript browser.wait使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類protractor/globals.browser
的用法示例。
在下文中一共展示了browser.wait方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
return browser.wait(() => {
this.pressSubmitButton();
return browser.wait(ExpectedConditions.alertIsPresent(), 5000).then(
browser.switchTo().alert().then(
// use alert.accept instead of alert.dismiss which results in a browser crash
function(alert) { alert.accept(); return true; },
function() { return false; }
)
);
});
示例2: waitUntilElementNotVisible
waitUntilElementNotVisible(selector: string) {
browser.wait(protractor.ExpectedConditions.invisibilityOf(element(by.css(selector))), 5000, 'Element ' + selector + ' is still visible');
}
示例3: waitUntilElementPresent
waitUntilElementPresent(selector: string) {
browser.wait(protractor.ExpectedConditions.presenceOf(element(by.css(selector))), 5000, 'Element ' + selector + ' taking too long to appear in the DOM');
}
示例4: waitForStalenessOf
export function waitForStalenessOf (_element ) {
var EC = protractor.ExpectedConditions;
return browser.wait(EC.stalenessOf(_element));
}
示例5: waitForElementVisibility
export function waitForElementVisibility (_element ) {
var EC = protractor.ExpectedConditions;
return browser.wait(EC.visibilityOf(_element));
}
示例6: waitForElementPresence
export function waitForElementPresence (_element ) {
var EC = protractor.ExpectedConditions;
return browser.wait(EC.presenceOf(_element));
}
示例7: login
login() {
browser.wait(function() {return element(by.css('input.form-control')).isPresent();});
this.setUserNameAndPassword('admin', 'password');
this.submitLoginForm();
browser.wait(function() {return element(by.css('.logout')).isPresent();});
}