Support test drivers : UI, Mobile
@TestConfiguration(
testDriver = TestDriver.WEB,
browser=Browsers.CHROME,
implicitlyWaitTime = 15,
baseUrl = "http://watir.com/examples/shadow_dom.html"
)
public class TestKandyWebElementActionsWithPageObject {
@BeforeTest
public void goSite() {
OpenBrowser();
GoTo(baseUrl());
print(GetTitle());
}
@Test
public void testMothod() {
hadowDomTestPage shadowPage = getWebPage(ShadowDomTestPage.class);
String actualText = shadowPage.nestedText.getText();
assertThat(actualText).isEqualTo("nested text");
}
}
@TestConfiguration(
testDriver = TestDriver.MOBILE_ANDROID,
mobileApp = "Demo.apk",
mobileDeviceName = "Pixel_2_XL_API_33",
)
public class TC50_AndroidMobileTest {
@BeforeTest
public void launchApp() {
OpenMobileApp();
}
public void testMothod() {
AndroidDemoPage page = getAndroidPage(AndroidDemoPage.class);
page.name.type("A", "B","C");
page.name.typeWithLocatorParms("x", "y","z");
hideKeyboard();
// more code
}
}