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