use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class CssCommonTests method clipPath_01.
@Test(groups = { "android", "ios" })
public void clipPath_01() throws Exception {
this.cssBasePage.navToPage("clipPath");
UIElement mainElement = this.cssBasePage.find.byText("clipPath", false, 3);
if ((this.settings.platformVersion.toString().startsWith("4")) && (this.settings.deviceType == DeviceType.Emulator)) {
this.compareElements(mainElement, 10, 20d);
} else {
this.compareElements(mainElement, 5, 1d);
}
this.assertImagesResults();
}
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();
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class TransitionsPage method navigateToTransition.
private boolean navigateToTransition(String buttonTextContent) {
int timeOut = 20000;
int displayTimeOut = timeOut;
UIElement button = this.wait.waitForVisible(this.locators.byText(buttonTextContent), timeOut, false);
if (button != null) {
Point point = mainLayoutContainer().getLocation();
this.log.info("Main container location before while cycle is: x = " + point.getX() + " y = " + point.getY());
this.log.info("The button is visible before while cycle is: " + button.isDisplayed());
while ((!button.isDisplayed() || point.getX() > 0) && displayTimeOut > 0) {
this.log.info("The button is visible: " + button.isDisplayed());
this.log.info("Display retries: " + displayTimeOut);
point = mainLayoutContainer().getLocation();
this.log.info("Main container location is: x = " + point.getX() + " y = " + point.getY());
button = this.find.byText(buttonTextContent, timeOut);
displayTimeOut -= 1000;
if (displayTimeOut < 0) {
this.log.error("The element is not visible: " + button);
}
}
if (button.isDisplayed()) {
this.log.info("Navigate to transition: " + buttonTextContent);
return NavigationHelper.navigateTo(button, ClickType.Click, null, buttonTextContent);
} else {
this.log.error("Button is not visible");
return false;
}
}
return false;
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class BindingsBasePage method navigateToBindings.
private void navigateToBindings() {
UIElement btnBindings = this.wait.waitForVisible(this.locators.byText(BINDINGS));
this.navigateTo(btnBindings, this.mainPage);
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class NavOptionsTests method navOption_01_clearHistory_navigateBack.
@Test(groups = { "android", "ios" })
public void navOption_01_clearHistory_navigateBack() throws Exception {
this.clearHistoryAndUpdate("0", "1");
if (this.settings.platform == PlatformType.Android) {
// Navigate back should go to home screen
this.navOptionsPage.navigateBack();
if (this.settings.platformVersion < 7.1) {
UIElement phone = this.wait.waitForVisible(this.locators.byText("Phone"), false);
UIElement people = this.wait.waitForVisible(this.locators.byText("People"), false);
Assert.assertTrue((phone != null) || (people != null), "Back button do not set app in background.");
} else {
this.wait.waitForVisible(this.locators.byText("Chrome"), true);
}
this.app.restart();
this.navOptionsPage.homePageLoaded();
this.compareScreens(10, 5);
} else if (this.settings.platform == PlatformType.iOS) {
this.compareScreens(5);
this.navOptionsPage.navigateWithBackToMain();
}
this.assertImagesResults();
}
Aggregations