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);
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class SmokeTests method test_03_NavigatToHome.
@Test(description = "Verify home page looks OK.", groups = { "android", "ios" })
public void test_03_NavigatToHome() throws Exception {
HomePage homePage = new HomePage();
homePage.tabButton("Home");
this.assertScreen("template-tab-navigation-home", this.settings.shortTimeout, 0.1);
this.find.byText("Item 5").tap();
UIElement detail = this.find.byText("Description for Item 5");
Assert.notNull(detail, "Failed to navigate to details page.");
homePage.navigateBack();
this.assertScreen("template-tab-navigation-home", this.settings.shortTimeout, 0.1);
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class NavOptionsPage method update.
public void update() {
UIElement element = this.wait.waitForVisible(this.locators.byText("update"));
element.click();
this.log.info("Click on update");
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class BindingTests method binding_02_xmlBasics.
@Test(groups = { "android", "ios" })
public void binding_02_xmlBasics() throws Exception {
this.bindingsBasePage.navigateToMainPage();
UIElement element = this.find.byTextContains("xmlbasics");
this.bindingsBasePage.navigateTo(element);
if (this.settings.platform == PlatformType.iOS) {
this.compareScreens(5);
} else {
Assert.assertEquals(this.bindingsBasePage.bindingXmlBasicsPage.editTextField().getText(), "Text");
Assert.assertEquals(this.bindingsBasePage.bindingXmlBasicsPage.btnText().getText(), "");
}
this.bindingsBasePage.bindingXmlBasicsPage.tapTextBtn();
if (this.settings.platform == PlatformType.iOS) {
this.compareScreens(5);
} else {
Assert.assertEquals(this.bindingsBasePage.bindingXmlBasicsPage.btnText().getText().toLowerCase(), "text");
}
this.bindingsBasePage.bindingXmlBasicsPage.tapBtn();
if (this.settings.platform == PlatformType.iOS && this.settings.platformVersion <= 10) {
this.compareScreens(5);
} else {
this.device.assertLogContains("### onTap event ###");
}
this.assertImagesResults();
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class BindingTests method binding_01_basics.
@Test(groups = { "android", "ios" })
public void binding_01_basics() throws Exception {
if (this.settings.platform == PlatformType.iOS && this.settings.platformVersion < 11) {
return;
}
UIElement btnBasics = this.bindingsBasePage.wait.waitForVisible(this.locators.byText("basics"));
this.bindingsBasePage.navigateTo(btnBasics, "basics");
this.bindingsBasePage.bindingBasicsPage.tapSetTextBtn();
this.bindingsBasePage.bindingBasicsPage.tapOneWayBtn();
if (this.settings.platform == PlatformType.iOS) {
this.compareScreens(5);
} else {
Assert.assertEquals(this.bindingsBasePage.bindingBasicsPage.editTextFieldOneWay().getText(), "Test");
Assert.assertEquals(this.bindingsBasePage.bindingBasicsPage.btnOneWay().getText().toLowerCase(), "oneway");
}
this.bindingsBasePage.bindingBasicsPage.tapTwoWayBtn();
if (this.settings.platform == PlatformType.iOS) {
this.compareScreens(5);
} else {
Assert.assertEquals(this.bindingsBasePage.bindingBasicsPage.editTextFieldTwoWay().getText(), "Test");
Assert.assertEquals(this.bindingsBasePage.bindingBasicsPage.btnTwoWay().getText().toLowerCase(), "test");
}
this.assertImagesResults();
}
Aggregations