1. I need to add below method to get it working
public MobilePageObject(final WebDriver driver) {
super(driver, new Predicate<PageObject>() {
@Override
public boolean apply(PageObject page) {
PageFactory
.initElements(new AppiumFieldDecorator(((WebDriverFacade) page.getDriver()).getProxiedDriver(),
page.getImplicitWaitTimeout().in(TimeUnit.SECONDS), TimeUnit.SECONDS), page);
return true;
}
});
}
But I've no idea as of today about why this is needed ?
- In case of browser automation with Serenity; one doesn't need to do this.
- My understanding is that PageFactory constructor gets called automatically & user don't need to explicitly call it when browser gets initialised.
- Why is it needed for native app automation then ?
Thanks & Regards,