本文整理匯總了TypeScript中protractor/globals.browser.sleep方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript browser.sleep方法的具體用法?TypeScript browser.sleep怎麽用?TypeScript browser.sleep使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類protractor/globals.browser
的用法示例。
在下文中一共展示了browser.sleep方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
return this.getIconButton(name, '.fa-pencil').click().then(() =>{
let url = browser.getCurrentUrl();
browser.sleep(500);
return this.closePane('.main.close-button').then(() => {
return url;
});
});
示例2: element
return element(by.css('.metron-dialog .btn-primary')).click().then(() => {
browser.sleep(1000);
return element(by.css('.alert .close')).click().then(() => {
return waitForStalenessOf(element(by.cssContainingText('td', name))).then(() =>{
return true;
});
})
});
示例3: it
it('should automatically write down the fullname', () => {
po_welcome.setFirstname('Rob');
po_welcome.setLastname('Eisenberg');
// For now there is a timing issue with the binding.
// Until resolved we will use a short sleep to overcome the issue.
browser.sleep(200);
expect(po_welcome.getFullname()).toBe('ROB EISENBERG');
});
示例4: waitSeconds
waitSeconds(seconds: number) {
browser.sleep(seconds*1000);
}
示例5: waitForAnimation
waitForAnimation() {
browser.sleep(500);
}
示例6: logout
logout() {
browser.ignoreSynchronization = true;
element.all(by.css('.alert .close')).click();
element.all(by.css('.logout-link')).click();
browser.sleep(2000);
}