use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class SdkWebViewTests method sdkWebViewTest.
@Test(dataProvider = "example")
public void sdkWebViewTest(String example) {
this.mainPage.navigateTo(example);
if (example.equalsIgnoreCase(pageViewViewUsage)) {
if (this.settings.platform == PlatformType.Android && this.settings.platformVersion >= 5) {
UIElement element = this.find.byText("Get Started");
Assert.notNull(element, "WebView with {N} docs not loaded.");
} else if (this.settings.platform == PlatformType.iOS) {
UIElement element = this.find.byText("NativeScript Documentation");
Assert.notNull(element, "WebView with {N} docs not loaded.");
}
} else if (example.equalsIgnoreCase(pageWebViewTips)) {
if (this.settings.platformVersion >= 5) {
UIElement element = this.find.byText("My First Heading");
Assert.notNull(element, "Tips & Tricks web page not loaded.");
}
}
}
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 ActionBarFirstPage method navigateToActionBarPage.
public boolean navigateToActionBarPage() {
UIElement btnElement = this.wait.waitForVisible(this.locators.byText(actionBarOne, false, false));
boolean result = this.navigateTo(btnElement, actionBarOne);
this.navigationManager.setMainPage(actionBarOne);
if (result) {
this.wait.waitForVisible(this.locators.byText("Title", false, false), true);
}
return result;
}
use of functional.tests.core.mobile.element.UIElement in project functional-tests by NativeScript.
the class SdkFpsMeterTests method sdkFpsMeterTest.
@Test(dataProvider = "example")
public void sdkFpsMeterTest(String example) throws Exception {
if (this.settings.platform == PlatformType.Android) {
UIElement btn = this.wait.forVisibleElements(this.locators.textViewLocator(), 30, false).get(1);
this.mainPage.navigateTo(btn);
} else {
this.mainPage.navigateTo(example);
}
}
Aggregations