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