Search in sources :

Example 31 with UIElement

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

the class MainPageTest method groceries_01_addItem.

@Test(groups = { "android", "ios" })
public void groceries_01_addItem() throws Exception {
    UIElement element = this.mainPage.insertItem(testText);
    this.assertImagesResults();
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) Test(org.testng.annotations.Test) MobileTest(functional.tests.core.mobile.basetest.MobileTest)

Example 32 with UIElement

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

the class SdkSliderTests method sdkSliderTest.

@Test(dataProvider = "example")
public void sdkSliderTest(String example) throws Exception {
    UIElement btn = this.find.byTextContains(example);
    this.mainPage.navigateTo(btn);
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) Test(org.testng.annotations.Test) SdkBaseTest(sdkexamples.SdkBaseTest)

Example 33 with UIElement

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

the class DialogsPage method tapNoBtn.

public void tapNoBtn() {
    UIElement el = this.find.byText("No");
    if (this.settings.platform == PlatformType.iOS && this.settings.platformVersion >= 10) {
        el.tap();
    } else {
        el.click();
    }
    this.log.info("Choose 'No' option.");
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement)

Example 34 with UIElement

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

the class DialogsPage method tapLoginBtn.

public void tapLoginBtn() {
    UIElement el = this.find.byText("login");
    if (this.settings.platform == PlatformType.iOS && this.settings.platformVersion >= 10) {
        el.tap();
    } else {
        el.click();
    }
    this.log.info("Tap on 'login' button.");
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement)

Example 35 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)

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