title: Share Page Object classes between appium and webdriver
body: <p>i wanted to know how can I get to share the same objects between Selenium WebDriver and Appium's AndroidDriver and IOSDriver.</p>
  
  <p>Right now i have duplicated the page objets to make the mobile version of my code with appium, but i'm sure that i can make them in a way that i can share the same code because the main different appart of some elements in the page, is the constructor.</p>
  
  <p>In the AppiumDriver PO:</p>
  
  <pre><code>public class ObjHomePageMobileWeb {
  
      protected AppiumDriver&lt;MobileElement&gt; driver;
      protected By element = By...;
  
      public ObjHomePageMobileWeb(AppiumDriver&lt;MobileElement&gt; driver) {
          this.driver = driver;
      }
  </code></pre>
  
  <p>And in the WebDriver PO i have:</p>
  
  <pre><code>public class ObjHomePageWebPc {
  
      protected WebDriver driver;
      protected By element = By...;
  
      public ObjHomePageWebPc(WebDriver driver) {
          this.driver = driver;
      }
  </code></pre>
  
  <p>In my tests suites, i instantiate this PO with the corresponding driver.</p>
  
  <p>Thanks in advance.</p>