本文整理匯總了TypeScript中nativescript-dev-appium.UIElement.click方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript UIElement.click方法的具體用法?TypeScript UIElement.click怎麽用?TypeScript UIElement.click使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類nativescript-dev-appium.UIElement
的用法示例。
在下文中一共展示了UIElement.click方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("should toggle on both views in reverse", async () => {
await secondButton.click();
await firstButton.click();
let conditional1 = await driver.findElementByAutomationText("first");
let conditional2 = await driver.findElementByAutomationText("second");
await isAbove(firstLabel, conditional1);
await isAbove(conditional1, conditional2);
await isAbove(conditional2, secondLabel);
});
示例2: Error
(async () => {
await secondButton.click();
await firstButton.click();
driver.findElementByAutomationText("first", 500)
.then(_ => { throw new Error("first label found!"); })
.catch(() => {
driver.findElementByAutomationText("second", 500)
.then(_ => { throw new Error("second label found!"); })
.catch(() => done());
});
})();
示例3: async
const addElement = async () => {
await addButton.click();
lastAddedElementId += 1;
const newElement = await getElement(lastAddedElementId);
elements.push(newElement);
};
示例4: catch
(async () => {
await toggleButton.click();
try {
await driver.findElementByAutomationText("Label");
} catch (e) {
done();
}
})();
示例5: async
const addElement = async () => {
await addButton.click();
lastAddedElementId += 1;
const newElement = await driver.findElementByAutomationText(
lastAddedElementId.toString());
elements.push(newElement);
};
示例6: it
it("should navigate to third tab item", async () => {
await thirdTabItem.click();
await driver.findElementByAutomationText("Third Tab");
const notSelectedTabItems = await driver.findElementsByText("not selected");
firstTabItem = notSelectedTabItems[0];
secondTabItem = notSelectedTabItems[1];
thirdTabItem = await driver.findElementByAutomationText("SELECTED");
const screenMatches = await driver.compareScreen("tab-view-binding-third-tab", 5);
assert(screenMatches);
});
示例7: async
const toggleFirst = async () => {
await toggleFirstButton.click();
};