本文整理汇总了TypeScript中aurelia-protractor-plugin/protractor.element函数的典型用法代码示例。如果您正苦于以下问题:TypeScript element函数的具体用法?TypeScript element怎么用?TypeScript element使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了element函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: element
const login = () => {
return element(by.id('username')).sendKeys("user@webelexis.ch").then(() => {
return element(by.id("password")).sendKeys("user").then(() => {
return element(by.css('button[type="submit"')).click()
})
})
}
示例3: getFirstnameElement
getFirstnameElement() {
return element(by.valueBind('firstName'));
}
示例4: pressSubmitButton
pressSubmitButton() {
return element(by.css('button[type="submit"]')).click();
}
示例5: getGreeting
getGreeting() {
return element(by.tagName('h2')).getText();
}
示例6: getFullnameElement
getFullnameElement() {
return element(by.css('.help-block'));
}
示例7: getLastnameElement
getLastnameElement() {
return element(by.valueBind('lastName'));
}
示例8: setFirstname
setFirstname(value) {
let firstName = element(by.valueBind('firstName'));
return firstName.clear().then(() => firstName.sendKeys(value));
}
示例9: getFullname
getFullname() {
return element(by.css('.help-block')).getText();
}
示例10: setLastname
setLastname(value) {
let lastName = element(by.valueBind('lastName'));
return lastName.clear().then(() => lastName.sendKeys(value));
}