本文整理匯總了TypeScript中protractor/globals.element函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript element函數的具體用法?TypeScript element怎麽用?TypeScript element使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了element函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: element
return element.all(by.css('.advanced-link')).click().then(() => {
element(by.css('input[formcontrolname="newConfigKey"]')).sendKeys(key);
element(by.css('input[ng-reflect-name="newConfigValue"]')).sendKeys(value);
});
示例2: element
browser.wait(function() {return element(by.css('input.form-control')).isPresent();});
示例3: getErrorMessage
getErrorMessage() {
let errorMessage = element(by.css('div[style="color:#a94442"]')).getText();
return errorMessage.then(message => {
return message.replace(/\n/,'').replace(/LOG\ IN$/,'');
})
}
示例4: getFullname
getFullname() {
return element(by.css('.help-block')).getText();
}
示例5: getGreeting
getGreeting() {
return element(by.tagName('h2')).getText();
}
示例6: getNavigationTitle
getNavigationTitle() {
return element(by.css('.navigation .nav-link-title')).getText();
}
示例7: selectNavLink
selectNavLink(linkName: string) {
return element(by.cssContainingText('.navigation .nav-link', linkName)).click().then((args) => {
return true;
});
}
示例8: setParserType
setParserType(parserName: string) {
return element(by.css('select[formcontrolname="parserClassName"]')).click().then(() => {
return element.all(by.cssContainingText('select[formcontrolname="parserClassName"] option', parserName)).get(0).click();
})
}
示例9: setSampleMessage
setSampleMessage(paneName: string, message: string) {
let sampleMsgTextArea = element(by.css('metron-config-' + paneName + ' .form-control.sample-input'));
return waitForElementVisibility(sampleMsgTextArea).then(() => {
return sampleMsgTextArea.sendKeys(message);
})
}
示例10: saveParser
saveParser() {
return element(by.css('.btn.save-button')).click();
}