本文整理匯總了TypeScript中protractor.ElementFinder.locator方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ElementFinder.locator方法的具體用法?TypeScript ElementFinder.locator怎麽用?TypeScript ElementFinder.locator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類protractor.ElementFinder
的用法示例。
在下文中一共展示了ElementFinder.locator方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: isHidden
export const waitUntilHidden = (selector: ElementFinder, classname = '', timeout = waitUntilDisplayedTimeout) => {
if (!checkSelectorExist(selector)) return;
browser.wait(
isHidden(selector),
timeout,
`Failed while waiting for "${selector.locator()}" of Page Object Class '${classname}' to be hidden.`
);
};
示例2: safeExpectIsDispayed
export function safeExpectIsDispayed(element: ElementFinder, interval?: number) {
const timeout = interval || TIMEOUT;
return browser.wait(EC.visibilityOf(element), timeout, `element ${element.locator().value} is not visible in ${timeout} ms`);
}
示例3: safeDragAndDrop
export function safeDragAndDrop(from: ElementFinder, to: any) {
return browser.wait(EC.visibilityOf(from), TIMEOUT, `element ${from.locator().value} not visible`)
.then(() => disableAnimations())
.then(() => browser.actions().dragAndDrop(from, to).perform());
}