Hi All,
Iam getting following error while running following script as seen below
iam using POM for the project where i have created 2 class one class contains pagefactory elements and other includes test cases. but iam getting Instantiation exception over the initialization of the android driver as seen below
public class HomePageFactory
{
private AndroidDriver driver
public HomePageFactory(AndroidDriver driver)
{
this.driver = driver;
}
public void swipeDirection()
{
//swipe operation
}}
Test Cases Class:
public class VerifyHomePageTC
{
private AndroidDriver driver;
@Test
public void VerifyHomePageSwipeAndSideMenuOpen() throws MalformedURLException, InterruptedException
{
HomePageFactory home = PageFactory.initElements(driver, HomePageFactory.class);
Thread.sleep(3000);
home.swipeDirection();
}
}
when i run the TC, iam getting following error
java.lang.RuntimeException: java.lang.InstantiationException: Testpages.HomePageFactory
Can any one help me out with your answer to resolve this issue… Appreciate for your valuable replay
Thanks