本文整理匯總了TypeScript中protractor.by.name方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript by.name方法的具體用法?TypeScript by.name怎麽用?TypeScript by.name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類protractor.by
的用法示例。
在下文中一共展示了by.name方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: setForm
/**
* Set form
* @param {number} index
* @param {string} name
* @param {string} type
* @param {string} uri
* @param {string} metaUri
*/
setForm(index: number, name: string, type: string, uri: string, metaUri: string) {
element(by.name(`name${index}`)).sendKeys(name);
element(by.name(`type${index}`)).sendKeys(type);
element(by.name(`uri${index}`)).sendKeys(uri);
element(by.name(`metaDataUri${index}`)).sendKeys(metaUri);
browser.sleep(100);
}
示例2: setUnregisters
/**
* Unregister all the applications of the table
*/
setUnregisters() {
element(by.css(`app-master-checkbox input`)).click();
browser.sleep(200);
element(by.css(`#dropdown-actions button`)).click();
browser.sleep(100);
element(by.css(`#unregister-apps`)).click();
browser.sleep(100);
element(by.name(`app-unregister`)).click();
browser.sleep(100);
}
示例3: it
it('should navigate to the Log application details page (button action)', () => {
browser.sleep(TICK_DELAY);
pageApps.getTableRows().first().element(by.name('app-view0')).click();
browser.wait(() => {
return browser.getCurrentUrl().then((url) => {
const parts = url.split('#');
expect(parts[1] === '/apps/sink/log').toBeTruthy();
return url;
});
});
});
示例4: ElementLocator
ElementLocator(obj) {
switch (obj.type) {
case IdentificationType[IdentificationType.Xpath]:
return element(by.xpath(obj.value));
case IdentificationType[IdentificationType.ClassName]:
return element(by.className(obj.value));
case IdentificationType[IdentificationType.Id]:
return element(by.id(obj.value));
case IdentificationType[IdentificationType.Js]:
return element(by.js(obj.value));
case IdentificationType[IdentificationType.Css]:
return element(by.css(obj.value));
case IdentificationType[IdentificationType.Name]:
return element(by.name(obj.value));
default:
break;
}
}
示例5: meetingPanels
export const meetingPanelMapButton = () => meetingPanels().get(0).element(by.name("mapModalButton"));
示例6: getCancel
/**
* Get the cancel button
* @returns {ElementFinder}
*/
getCancel() {
return element(by.name(`cancel`));
}
示例7: getActiveInput
getActiveInput(): ElementFinder {
return this.getForm().element(by.name('active'));
}
示例8: getSubmit
/**
* Get the submit button
* @returns {ElementFinder}
*/
getSubmit() {
return element(by.name(`register`));
}
示例9: getAdd
/**
* Get the add button
* @returns {ElementFinder}
*/
getAdd() {
return element(by.name(`add-form`));
}