Skip to content

BathiyaL/kandytest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Kandytest

Support test drivers : UI, Mobile

Writing Web UI test

@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");
  }
}

Writing mobile test

@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
 }
}

Test result reporting

Screenshot 2024-03-07 at 00 32 29

About

kandy-test-automation-framework

Resources

Stars

Watchers

Forks

Packages

No packages published