當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript AppiumDriver.findElementByAutomationText方法代碼示例

本文整理匯總了TypeScript中nativescript-dev-appium.AppiumDriver.findElementByAutomationText方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript AppiumDriver.findElementByAutomationText方法的具體用法?TypeScript AppiumDriver.findElementByAutomationText怎麽用?TypeScript AppiumDriver.findElementByAutomationText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在nativescript-dev-appium.AppiumDriver的用法示例。


在下文中一共展示了AppiumDriver.findElementByAutomationText方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

    it("should load first page", async () => {
        await driver.findElementByAutomationText("First Component");

        // ActionBar Title and item
        await driver.findElementByAutomationText("First Title");
        await driver.findElementByAutomationText("ACTION1");
    });
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:7,代碼來源:tests.e2e-spec.ts

示例2: navigateToTeamItem

async function navigateToTeamItem(driver: AppiumDriver, name: string, id: string) {
    const team = await driver.findElementByAutomationText(name);
    await team.click();
    await driver.findElementByAutomationText("Team Details");
    await driver.findElementByAutomationText(id);
    await driver.findElementByAutomationText(name);
}
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:7,代碼來源:tab-view-navigation.e2e-spec.ts

示例3: it

        it("should navigate to page", async () => {
            const navigationButton =
                await driver.findElementByAutomationText("ActionBarVisibility Never");
            await navigationButton.click();

            await driver.findElementByAutomationText("ShowActionBar");
        });
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:7,代碼來源:page-router-outlet.e2e-spec.ts

示例4: it

    it("should navigate second(team) tab, first(player) and back in the same order ", async () => {
        await driver.findElementByAutomationText("Player List");

        // Go forward in team tab
        await selectTeamTab(driver);
        await navigateToTeamItem(driver, "Team One", "1");

        // Go forward in player tab
        await selectPlayerTab(driver);
        await navigateToPlayerItem(driver, "Player Three", "3");

        // Check both tabs
        await selectTeamTab(driver, false);
        await selectPlayerTab(driver, false);

        // Go back in player tab
        await driver.navBack();
        await driver.findElementByAutomationText("Player List");

        // Go back in team tab
        await selectTeamTab(driver, false);
        await driver.navBack();
        await driver.findElementByAutomationText("Team List");

        await selectPlayerTab(driver);
    });
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:26,代碼來源:tab-view-navigation.e2e-spec.ts

示例5: it

        it("should find elements", async () => {
            firstActionItem = await driver.findElementByAutomationText("one");
            secondActionItem = await driver.findElementByAutomationText("two");

            toggleFirstButton = await driver.findElementByAutomationText("toggle 1");
            toggleSecondButton = await driver.findElementByAutomationText("toggle 2");
        });
開發者ID:NativeScript,項目名稱:nativescript-angular,代碼行數:7,代碼來源:action-bar.e2e-spec.ts

示例6: selectPlayerTab

async function selectPlayerTab(driver: AppiumDriver, expectList = true) {
    const playerTab = await driver.findElementByAutomationText("Players");
    await playerTab.click();

    const expectedTitle = expectList ? "Player List" : "Player Details";
    await driver.findElementByAutomationText(expectedTitle);
}
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:7,代碼來源:tab-view-navigation.e2e-spec.ts

示例7: it

 it("should go back to second(1) and first", async () => {
     await findAndClick(driver, "Back");
     await driver.findElementByAutomationText("Second Component: 1");
     await findAndClick(driver, "Back");
     await driver.findElementByAutomationText("First Title");
     await driver.findElementByAutomationText("ACTION1");
 });
開發者ID:NativeScript,項目名稱:nativescript-angular,代碼行數:7,代碼來源:tests.e2e-spec.ts

示例8: selectTeamTab

async function selectTeamTab(driver: AppiumDriver, expectList = true) {
    const teamsTab = await driver.findElementByAutomationText("Teams");
    await teamsTab.click();

    const expectedTitle = expectList ? "Team List" : "Team Details";
    await driver.findElementByAutomationText(expectedTitle);
}
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:7,代碼來源:tab-view-navigation.e2e-spec.ts

示例9: navigateToPlayerItem

async function navigateToPlayerItem(driver: AppiumDriver, name: string, id: string) {
    let player = await driver.findElementByAutomationText(name);
    await player.click();

    await driver.findElementByAutomationText("Player Details");
    await driver.findElementByAutomationText(id);
    await driver.findElementByAutomationText(name);
}
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:8,代碼來源:tab-view-navigation.e2e-spec.ts


注:本文中的nativescript-dev-appium.AppiumDriver.findElementByAutomationText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。