本文整理汇总了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();
};