Search in sources :

Example 1 with UIElement

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

the class SdkLabelTests method sdkLabelTest.

@Test(dataProvider = "example")
public void sdkLabelTest(String example) throws Exception {
    this.mainPage.navigateTo(example);
    UIElement element = this.mainPage.find.byText("Change label text");
    element.click();
    element.click();
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) Test(org.testng.annotations.Test) SdkBaseTest(sdkexamples.SdkBaseTest)

Example 2 with UIElement

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

the class DialogsPage method tapYesBtn.

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

Example 3 with UIElement

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

the class SegmentedBarPage method segmentedBar1.

public UIElement segmentedBar1() {
    UIElement element = this.getSegmentedBars().get(0);
    Rectangle rect = this.getSegmentedBars().get(0).getUIRectangle();
    this.log.info("Segmented bar 1 location: ");
    this.log.info("x: " + rect.getX() + " y: " + rect.getY() + " width: " + rect.getWidth() + " height: " + rect.getHeight());
    return element;
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement)

Example 4 with UIElement

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

the class BackgroundPage method navToBackground.

public void navToBackground() {
    UIElement element = this.homePageExtended.wait.waitForVisible(this.homePageExtended.locators.byText(background));
    this.homePageExtended.navigateTo(element, background);
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement)

Example 5 with UIElement

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

the class ActionBarTests method actionBar_Background.

@Test(groups = { "android", "ios" })
public void actionBar_Background() throws Exception {
    this.actionBarPage.navigateTo("actBG");
    this.compareScreens(10);
    UIElement btnGoTo = this.find.byTextContains("go to");
    UIRectangle btnGoToRect = new UIRectangle(btnGoTo.getUIRectangle());
    btnGoToRect.tap();
    this.compareScreens(10);
    btnGoToRect.tap();
    this.compareScreens(10);
    this.actionBarPage.navigateTo(this.find.byTextContains("go to"));
    this.assertImagesResults();
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) UIRectangle(functional.tests.core.mobile.element.UIRectangle) Test(org.testng.annotations.Test) MobileTest(functional.tests.core.mobile.basetest.MobileTest)

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