Hello,
Can anyone guide for this error,after reading on forum was implementing pom
class AbstractScreen {
public static AndroidDriver driver;
public AbstractScreen(AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
class Objects extends AbstractScreen
@AndroidFindBy(className= “android.widget.Button”)
public WebElement Lanjutbtn;
and so on…
public Objects(AndroidDriver driver)
{
super(driver);
loadPage();
}
Class Base
{
Initialisation done…
}
Class Test extends Base
{
@Test()
public testing()
{
Objects start = PageFactory.initElements(driver,Objects.class);// Error occurs here
}
Error is
java.lang.RuntimeException: java.lang.InstantiationException: POM.Objects
at org.openqa.selenium.support.PageFactory.instantiatePage(PageFactory.java:134)
at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:64)
How do we have Instantiation done? in this case.
@Aleksei please advise…
Thanks
VS