title: Page Object Model for page with many elements
body: <p>I'm currently working on a Selenium solution for my company's website. I'm trying to use the Page Object Model with Page Factories.  The difficulty that I'm encountering is with pages that have many elements on them.  I've seen in examples that it is good practice to create methods to encapsulate each action rather than just access the element directly (i.e. Create a method ClickButtonA() rather than using buttonA.click()</p>
  
  <p>This?</p>
  
  <pre><code>public void login(String username, String password)
  {
      usernameInput.sendKeys(username);
      passwordInput.sendKeys(password);
      loginButton.click();
  }
  </code></pre>
  
  <p>Or something like</p>
  
  <pre><code>public void login(String username, String password)
  {
      setUsername(username);
      setPassword(password);
      clickLogin();
  }
  </code></pre>
  
  <p>My question is, what is best practice in this scenario?  Should I create methods to perform actions for each and every WebElement in the website or should I just create those on a need to use basis?</p>
  
  <p>I feel like it is better practice to create those methods for every WebElement but  with 50+ elements, I feel like it ends up being a little bloated for redundant methods.</p>