Search in sources :

Example 1 with UIRectangle

use of functional.tests.core.mobile.element.UIRectangle 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)

Example 2 with UIRectangle

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

the class TabViewTests method tabView_03_tabViewIcons.

@Test(groups = { "ios" })
public void tabView_03_tabViewIcons() throws Exception {
    this.homePageExtended.navigateTo("tab-view-icons");
    this.compareScreens(5);
    UIRectangle rect = new UIRectangle(this.find.byText("automatic").getUIRectangle());
    rect.extendRectangle(10, 10, 0, 0);
    rect.tap();
    this.compareScreens(5);
    rect.tap();
    this.compareScreens(5);
    rect.tap();
    this.compareScreens(5);
    this.assertImagesResults();
}
Also used : UIRectangle(functional.tests.core.mobile.element.UIRectangle) Test(org.testng.annotations.Test)

Example 3 with UIRectangle

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

the class CssCommonTests method backgroundshort_hand.

@Test(groups = { "android", "ios" })
public void backgroundshort_hand() throws Exception {
    this.cssBasePage.navToPage("background-shorthand");
    this.compareScreens(5);
    UIRectangle btn = new UIRectangle(this.find.byText("a1").getUIRectangle(), this.context);
    btn.extendRectangle(10, 10, 0, 0);
    for (int i = 0; i < 17; i++) {
        btn.tap();
        this.compareScreens(5);
    }
    this.assertImagesResults();
}
Also used : UIRectangle(functional.tests.core.mobile.element.UIRectangle) Test(org.testng.annotations.Test)

Example 4 with UIRectangle

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

the class ActionBarTests method actionBar_41_actBGCss_issue_516.

@Test(groups = { "android", "ios" })
public void actionBar_41_actBGCss_issue_516() throws Exception {
    this.actionBarPage.navigateTo("actBGCss");
    String imageNameRed = "actionBar_41_actBGCss_red";
    String imageNameTrans = "actionBar_41_actBGCss_trans";
    this.compareElements(imageNameRed, this.actionBarPage.actionBar(), 10, 0.01);
    UIRectangle btnGoTo = new UIRectangle(this.find.byTextContains("go to").getUIRectangle());
    btnGoTo.tap();
    this.compareElements(imageNameTrans, this.actionBarPage.actionBar(), 10, 0.01);
    btnGoTo.tap();
    this.compareElements(imageNameRed, this.actionBarPage.actionBar(), 10, 0.01);
    btnGoTo.tap();
    this.find.byTextContains("ITEM").tap();
    this.compareElements(imageNameRed, this.actionBarPage.actionBar(), 10, 0.01);
    this.assertImagesResults();
}
Also used : UIRectangle(functional.tests.core.mobile.element.UIRectangle) Test(org.testng.annotations.Test) MobileTest(functional.tests.core.mobile.basetest.MobileTest)

Example 5 with UIRectangle

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

the class GesturesTests method gestures_08_disconnectObserver.

@Test(groups = { "android", "ios" })
public void gestures_08_disconnectObserver() throws Exception {
    this.gesturesPage.navigateToGestures();
    UIRectangle tapElement = new UIRectangle(this.gesturesPage.lblTap().getUIRectangle());
    this.gesturesPage.tapStopBtn();
    if (this.settings.platformVersion < 11 && this.settings.platform == PlatformType.iOS) {
        this.assertScreen(5);
    } else {
        Assert.assertNotNull(this.homePageExtended.find.byText("Gestures detection disabled"), "Failed to disable gestures observer.");
    }
    tapElement.tap();
    if (this.settings.platformVersion < 11 && this.settings.platform == PlatformType.iOS) {
        this.assertScreen(5);
    } else {
        Assert.assertNull(this.homePageExtended.find.byText("Tap gesture detected"), "Tap gesture detected while gestures observer is disabled");
    }
}
Also used : UIRectangle(functional.tests.core.mobile.element.UIRectangle) Test(org.testng.annotations.Test)

Aggregations

UIRectangle (functional.tests.core.mobile.element.UIRectangle)6 Test (org.testng.annotations.Test)5 MobileTest (functional.tests.core.mobile.basetest.MobileTest)2 UIElement (functional.tests.core.mobile.element.UIElement)1