Search in sources :

Example 76 with UIElement

use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.

the class SdkWebViewTests method sdkWebViewTest.

@Test(dataProvider = "example")
public void sdkWebViewTest(String example) {
    this.mainPage.navigateTo(example);
    if (example.equalsIgnoreCase(pageViewViewUsage)) {
        if (this.settings.platform == PlatformType.Android && this.settings.platformVersion >= 5) {
            UIElement element = this.find.byText("Get Started");
            Assert.notNull(element, "WebView with {N} docs not loaded.");
        } else if (this.settings.platform == PlatformType.iOS) {
            UIElement element = this.find.byText("NativeScript Documentation");
            Assert.notNull(element, "WebView with {N} docs not loaded.");
        }
    } else if (example.equalsIgnoreCase(pageWebViewTips)) {
        if (this.settings.platformVersion >= 5) {
            UIElement element = this.find.byText("My First Heading");
            Assert.notNull(element, "Tips & Tricks web page not loaded.");
        }
    }
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) Test(org.testng.annotations.Test) SdkBaseTest(sdkexamples.SdkBaseTest)

Example 77 with UIElement

use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.

the class HomePage method navigate.

public void navigate(String pageName) {
    this.find.byText(pageName).tap();
    UIElement browse = this.wait.waitForVisible(this.locators.findByTextLocator("Browse", true));
    Assert.assertNotNull(browse);
    this.log.info("Navigate to " + pageName);
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement)

Example 78 with UIElement

use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.

the class ActionBarFirstPage method navigateToActionBarPage.

public boolean navigateToActionBarPage() {
    UIElement btnElement = this.wait.waitForVisible(this.locators.byText(actionBarOne, false, false));
    boolean result = this.navigateTo(btnElement, actionBarOne);
    this.navigationManager.setMainPage(actionBarOne);
    if (result) {
        this.wait.waitForVisible(this.locators.byText("Title", false, false), true);
    }
    return result;
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement)

Example 79 with UIElement

use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.

the class SdkFpsMeterTests method sdkFpsMeterTest.

@Test(dataProvider = "example")
public void sdkFpsMeterTest(String example) throws Exception {
    if (this.settings.platform == PlatformType.Android) {
        UIElement btn = this.wait.forVisibleElements(this.locators.textViewLocator(), 30, false).get(1);
        this.mainPage.navigateTo(btn);
    } else {
        this.mainPage.navigateTo(example);
    }
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) Test(org.testng.annotations.Test) SdkBaseTest(sdkexamples.SdkBaseTest)

Aggregations

UIElement (functional.tests.core.mobile.element.UIElement)79 Test (org.testng.annotations.Test)37 MobileTest (functional.tests.core.mobile.basetest.MobileTest)15 SdkBaseTest (sdkexamples.SdkBaseTest)8 By (org.openqa.selenium.By)3 AnimationsBaseTest (animations.Tests.AnimationsBaseTest)1 ScrollableListObject (functional.tests.core.extensions.ScrollableListObject)1 UIRectangle (functional.tests.core.mobile.element.UIRectangle)1 Point (org.openqa.selenium.Point)1 AfterMethod (org.testng.annotations.AfterMethod)1 BeforeClass (org.testng.annotations.BeforeClass)1 HomePage (templates.tabnavigation.pages.HomePage)1 HomePage (testsappng.Screens.HomePage)1 HomePageExtended (uitests.Screens.HomePageExtended)1