title: The purpose of passing the web driver object into page object base class's constructor
body: <p>I have seen the web driver object is having in the page object base class level's constructor as follows. </p>
  
  <p>Example: </p>
  
  <pre><code>public class PageObjectBase 
  {
      protected WebDriver driver;
  
      public PageObjectBase(WebDriver driver){
  
          driver = this.driver;
      }
  }
  
  public class LoginPage extends PageObjectBase 
  {
  
      public LoginPage(WebDriver driver){
  
          super(driver);
      }
  }
  </code></pre>
  
  <p>What are the advantages and disadvantages of this approach? Why are we always passing driver object to base constructor?</p>