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


TypeScript AppiumDriver.navBack方法代碼示例

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


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

示例1: 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

示例2: it

    it("should skip first navigate back", async function () {
        if (driver.isIOS) {
            this.skip();
        }

        await driver.navBack();
        const textElement = await driver.findElementsByText("will cancel next back press: false", SearchOptions.contains, elementDefaultWaitTimeInSeconds);
        assert.isTrue(textElement !== null);
        await driver.navBack();
        await screen.loadedHome();
    })
開發者ID:NathanWalker,項目名稱:NativeScript,代碼行數:11,代碼來源:android-back-button.e2e-spec.ts

示例3: it

 it("should navigate Player One then navigate Players list then Android back button", async function () {
     if (driver.isAndroid) {
         await testPlayerNavigated(screen, screen.playerOne);
         await testPlayerNextNavigated(screen, screen.playerTwo);
         await testPlayersNavigated(screen);
         await driver.navBack();
         await screen.loadedPlayerDetails(screen.playerTwo);
         await driver.navBack();
         await screen.loadedPlayersList();
     }
 });
開發者ID:NathanWalker,項目名稱:nativescript-angular,代碼行數:11,代碼來源:split-view.e2e-spec.ts

示例4: beforeEach

 beforeEach(async function () {
     try {
         const items = await getItems();
     } catch (err) {
         try {
             const lblNinjas = await driver.findElementByText("Ninjas!");
         }
         catch (err) {
             console.log("Navigating to ninjas page ...");
             await driver.navBack();
         }
         console.log("Navigating to main page ...");
         await driver.navBack();
     }
 });
開發者ID:NativeScript,項目名稱:nativescript-dev-webpack,代碼行數:15,代碼來源:tests.e2e-spec.ts

示例5: it

                    it("loaded player details and navigate parent frame and go back", async () => {
                        await shared.testPlayerNavigated(playerTwo, screen);

                        if (appSuspendResume) {
                            await driver.backgroundApp(suspendTime);
                            await driver.waitForElement(playerTwo.name); // wait for player
                        }

                        await shared[`testSomePageNavigated${transition}`](screen);

                        if (appSuspendResume) {
                            await driver.backgroundApp(suspendTime);
                            await driver.waitForElement(somePage); // wait for some page
                        }
                
                        if (driver.isAndroid) {
                            await driver.navBack();
                        } else {
                            await screen.goBackFromSomePage();
                        }

                        await screen.loadedPlayerDetails(playerTwo);
                
                        await screen.goBackToPlayersList();
                        await screen.loadedPlayersList();
                    });
開發者ID:NathanWalker,項目名稱:NativeScript,代碼行數:26,代碼來源:frame-tab-root.e2e-spec.ts

示例6: it

            it("loaded players details and navigate parent frame and go back", async () => {
                await shared.testPlayerNavigated(playerTwo, screen);

                if (appSuspendResume) {
                    await driver.backgroundApp(suspendTime);
                    await screen.loadedElement(playerTwo.description);
                }

                await shared[`testSomePageNavigated${transition}`](screen);

                if (appSuspendResume) {
                    await driver.backgroundApp(suspendTime);
                    await screen.loadedSomePage();
                }

                if (driver.isAndroid) {
                    await driver.navBack(); // some page back navigation
                } else {
                    await screen.goBackFromSomePage();
                }

                await screen.loadedPlayerDetails(playerTwo);
                await screen.loadedTeamsList(); // assert visible & no changes

                await screen.goBackToPlayersList();
                await screen.loadedPlayersList();
            });
開發者ID:m-abs,項目名稱:NativeScript,代碼行數:27,代碼來源:frame-root.e2e-spec.ts

示例7: beforeEach

 beforeEach(async function () {
     try {
         const lblPlatform = await getPlatformLabel();
     } catch (err) {
         console.log("Navigating to main page ...");
         await driver.navBack();
     }
 });
開發者ID:NativeScript,項目名稱:nativescript-dev-webpack,代碼行數:8,代碼來源:tests.e2e-spec.ts

示例8: testPlayerNavigatedBack

export async function testPlayerNavigatedBack(screen: Screen, driver: AppiumDriver) {
    if (driver.isAndroid) {
        await driver.navBack();
    } else {
        await screen.goBackToPlayersList();
    }

    await screen.loadedPlayersList();
}
開發者ID:m-abs,項目名稱:NativeScript,代碼行數:9,代碼來源:shared.e2e-spec.ts

示例9: navigateBackToHome

export async function navigateBackToHome(driver: AppiumDriver, view?: string) {
    let location = view !== undefined ? view : "ListView Angular";
    let homeTitle = await driver.findElementByTextIfExists(location, SearchOptions.exact);
    while (homeTitle === undefined) {
        await driver.navBack();
        await driver.wait(1000);
        homeTitle = await driver.findElementByTextIfExists(location, SearchOptions.exact);
    }
}
開發者ID:telerik,項目名稱:nativescript-ui-samples-angular,代碼行數:9,代碼來源:helper.ts


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