use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class SdkBaseTest method afterSdkBaseTestMethod.
@AfterMethod(alwaysRun = true)
public void afterSdkBaseTestMethod(ITestResult result) {
if (result.getStatus() == ITestResult.SKIP) {
result.setStatus(ITestResult.FAILURE);
this.log.info("Set test result from SKIP to FAILURE.");
}
try {
UIElement btnBack = this.mainPage.btnBack();
if (btnBack != null) {
this.mainPage.navigateBack(btnBack);
} else {
this.mainPage.navigateBack();
}
} catch (Exception ex) {
this.log.error(ex.getMessage());
result.setStatus(ITestResult.FAILURE);
}
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class SlideInEffectTests method slide_in_effect_02_animate.
@Test(groups = { "android", "ios" })
public void slide_in_effect_02_animate() throws Exception {
UIElement btnAddItem = this.demoPage.context.find.byText("Add Item");
for (int i = 0; i < 3; i++) {
btnAddItem.click();
Wait.sleep(1);
}
Wait.sleep(2);
this.compareScreens(this.settings.shortTimeout, 0.5);
this.assertImagesResults();
}
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 NavOptionsPage method clearHistory.
public void clearHistory() {
Wait.sleep(2000);
UIElement element = this.wait.waitForVisible(this.locators.byText("clear-history"));
this.log.info("Is clear-history isDisplayed " + element.isDisplayed());
this.log.info("Is clear-history isEnabled " + element.isEnabled());
element.tap();
this.log.info("Click on clear-history");
}
Aggregations