title: What are the best practices for appium framework using page opject model
body: <p>I am developing an automation framework for a mobile application using Appium (in java). I started with creating a class per view, in each class, I find and initialize elements of that class. Now after a while I understand my configuration for the framework is not correct and I'm not able to expand it. It would be great if anyone can introduce me an implemented framework on Github.</p>
  
  <p>here is my config class, I use setdriver() to set a driver wherever I need.</p>
  
  <pre><code>public class Config {
  
  public AndroidDriver&lt;AndroidElement&gt; driver;
  
  public static AndroidDriver&lt;AndroidElement&gt; SetDriver() throws MalformedURLException {
  
      File appPath= new File("src");
      File app = new File(appPath,"My-debug.apk");
  
      DesiredCapabilities cap = new DesiredCapabilities();
      cap.setCapability(MobileCapabilityType.DEVICE_NAME, "myDevice");
      cap.setCapability(MobileCapabilityType.APP,app.getAbsolutePath());
      cap.setCapability("autoGrantPermissions",true);
      cap.setCapability("appWaitActivity","com.xxxx.xxxx.ui.launch.LaunchActivity");
      AndroidDriver&lt;AndroidElement&gt; driver = new AndroidDriver&lt;AndroidElement&gt;(new URL("http://127.0.0.1:4723/wd/hub"),cap);
  
      return driver;
  }
  </code></pre>
  
  <p>Thank you in advance.</p>