本文整理匯總了TypeScript中aurelia-protractor-plugin/protractor.browser類的典型用法代碼示例。如果您正苦於以下問題:TypeScript browser類的具體用法?TypeScript browser怎麽用?TypeScript browser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了browser類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('finds patient with TitelSuffix "unittest"', async () => {
await login()
await browser.sleep(2000)
const inp = element(by.id('$find_search'))
console.log("found %s",inp)
await inp.sendKeys('unittest')
await browser.sleep(1000)
await element(by.css('button[type="submit"]')).click()
const t=await inp.getText
expect(t).toBe("Hallo")
})
示例2: function
return browser.wait(async () => {
await this.pressSubmitButton();
await browser.wait(ExpectedConditions.alertIsPresent(), 5000);
return 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; }
);
});
示例3: openAlertDialog
async openAlertDialog() {
await this.pressSubmitButton();
await browser.wait(ExpectedConditions.alertIsPresent(), 5000);
try {
await browser.switchTo().alert().accept();
return true;
} catch (e) {
return false;
}
}
示例4: 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');
});
示例5: function
return browser.wait(() => {
this.pressSubmitButton();
return 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; }
);
});
示例6: it
it('should automatically write down the fullname', () => {
po_welcome.setFirstname('John');
po_welcome.setLastname('Doe');
// 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<any>(po_welcome.getFullname()).toBe('JOHN DOE');
});
示例7: it
it('should automatically write down the fullname', async () => {
await poWelcome.setFirstname('John');
await poWelcome.setLastname('Doe');
// binding is not synchronous,
// therefore we should wait some time until the binding is updated
await browser.wait(
ExpectedConditions.textToBePresentInElement(
poWelcome.getFullnameElement(), 'JOHN DOE'
), 200
);
});
示例8: beforeEach
beforeEach(async () => {
poSkeleton = new PageObject_Skeleton();
poWelcome = new PageObject_Welcome();
await browser.loadAndWaitForAureliaPage(`http://localhost:${config.port}`);
});
示例9: beforeEach
beforeEach( () => {
po_skeleton = new PageObject_Skeleton();
po_welcome = new PageObject_Welcome();
browser.loadAndWaitForAureliaPage(`http://localhost:19876`);
});