Search in sources :

Example 51 with UIElement

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

the class CssCommonTests method margins_paddings_with_percentage_15.

@Test(groups = { "android", "ios" })
public void margins_paddings_with_percentage_15() throws Exception {
    this.cssBasePage.navToPage("margins-paddings-with-percentage");
    UIElement btn = this.cssBasePage.wait.waitForVisible(this.locators.byText("css", false, false), 6, true);
    this.compareScreens(compareScreens, 5);
    btn.tap();
    this.compareScreens(compareScreens, 5);
    this.assertImagesResults();
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) Test(org.testng.annotations.Test)

Example 52 with UIElement

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

the class TabViewCssPropertiesPage method loadScenario.

public void loadScenario(String example) {
    UIElement element = this.scrollTo(example, 5);
    element.tap();
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement)

Example 53 with UIElement

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

the class DialogsTests method dialogs_promptCapitalizationAll.

@Test(groups = { "ios" })
public void dialogs_promptCapitalizationAll() {
    UIElement btnShowDialog = this.find.byText("promptCapitalizationAll");
    btnShowDialog.click();
    Assert.assertTrue(this.isKeyboardUpperCase(), "Initial state of keyboard should be upper case.");
    String text = "CAp";
    this.setText(text);
    Assert.assertTrue(this.isKeyboardUpperCase(), "After small letter state of keyboard should be reset to upper case.");
    this.dialogsPage.tapOkBtn();
    Assert.assertEquals(this.dialogsPage.getLabelText(), text);
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) Test(org.testng.annotations.Test) MobileTest(functional.tests.core.mobile.basetest.MobileTest)

Example 54 with UIElement

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

the class DialogsTests method dialogs_promptCapitalizationWords.

@Test(groups = { "ios" })
public void dialogs_promptCapitalizationWords() {
    UIElement btnShowDialog = this.find.byText("promptCapitalizationWords");
    btnShowDialog.click();
    Assert.assertTrue(this.isKeyboardUpperCase(), "Initial state of keyboard should be upper case.");
    String text1 = "Wo";
    this.setText(text1);
    Assert.assertFalse(this.isKeyboardUpperCase(), "Keyboard should not change state until space.");
    String text2 = "rd ";
    this.setText(text2);
    Assert.assertTrue(this.isKeyboardUpperCase(), "Keyboard should be upper case for new word.");
    this.dialogsPage.tapOkBtn();
    Assert.assertEquals(this.dialogsPage.getLabelText(), text1 + text2);
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) Test(org.testng.annotations.Test) MobileTest(functional.tests.core.mobile.basetest.MobileTest)

Example 55 with UIElement

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

the class DialogsTests method dialogs_promptCapitalizationSentences.

@Test(groups = { "ios" })
public void dialogs_promptCapitalizationSentences() {
    UIElement btnShowDialog = this.find.byText("promptCapitalizationSentences");
    btnShowDialog.click();
    Assert.assertTrue(this.isKeyboardUpperCase(), "Initial state of keyboard should be upper case.");
    String text1 = "Sen";
    this.setText(text1);
    Assert.assertFalse(this.isKeyboardUpperCase(), "Keyboard should not change state until dot and space.");
    String text2 = "t. ";
    this.setText(text2);
    Assert.assertTrue(this.isKeyboardUpperCase(), "Keyboard should be upper case for new sentence.");
    this.dialogsPage.tapOkBtn();
    Assert.assertEquals(this.dialogsPage.getLabelText(), text1 + text2);
}
Also used : UIElement(functional.tests.core.mobile.element.UIElement) 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