title: POP concept - storing elements in different class
body: <p>Hi I am creating test framework based on POP.</p>
  
  <p>Is it good if I keep all elements on the PageClass e.g:</p>
  
  <pre><code>public class DraggablePage extends BaseExtendablePage {
  
  @FindBy(xpath = "//a[@href= '#tabs-1']") WebElement defaultFunctionalityTableHeader;
  @FindBy(xpath = "//a[@href= '#tabs-3']") WebElement constraintMovementTableHeader;  
   ....
  </code></pre>
  
  <p>Or is it better if I have the specific pageClass to keep those objects and return it in methods e.g:</p>
  
  <pre><code>public class DraggablePageObjects {
  
  @FindBy(id = "ui-id-1") static WebElement defaultFunctionalityTableHeader;
  
  public static WebElement getDefaultFunctionalityTableHeader(){
      return defaultFunctionalityTableHeader;
  }
  </code></pre>
  
  <p>In second example I need to invoke methods to get element like:</p>
  
  <pre><code> DraggablePageObjects.getDefaultFunctionalityTableHeader();
  </code></pre>
  
  <p>Or maybe there is a better idea to keep those elements?</p>