# PageFactory PageObjectModel issues

**URL:** <https://discuss.appium.io/t/pagefactory-pageobjectmodel-issues/9822>\
**Category:** Support\
**Created:** [April 23, 2016, 3:50am UTC](https://discuss.appium.io/t/pagefactory-pageobjectmodel-issues/9822 "2016-04-23T03:50:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [April 24, 2016, 8:13pm UTC](https://discuss.appium.io/t/pagefactory-pageobjectmodel-issues/9822/2 "2016-04-24T20:13:26Z")

</div>

we do it in another way.

**Base Page:**

```auto
public abstract class Page {
    protected WebDriver driver;

    public Page(WebDriver driver) {
        this.driver = driver;
       PageFactory.initElements(new AppiumFieldDecorator(driver, 30, TimeUnit.SECONDS), this);
    }
}

```

**Page example:**

```auto
public class CallPage extends Page {

    //Action bar
    @AndroidFindBy(id = "homeButton")
    private List<AndroidElement> homeButton;
    @AndroidFindBy(id = "backButton")
    private List<AndroidElement> backButton;

    // and other elements here .....

    public CallPage(WebDriver driver) {
        super(driver);
    }

    public boolean isCallPageLoaded() {
        return !homeButton.isEmpty() && !backButton.isEmpty();
    }
}

```

**Base Test:**

```auto
public class BaseTest {
    protected static AppiumDriver driver = null;
    // testNG staff here...
}

```

**Test:**

```auto
public class test_Call extends BaseTest {
    private CallPage callPage;

    callPage = new CallPage(driver);
    assertTrue("Call page is NOT loaded", callPage.isCallPageLoaded());
}

```

---

_[View the full topic](https://discuss.appium.io/t/pagefactory-pageobjectmodel-issues/9822)._
