title: How can we initialize a webdriver instance without declaring it static and use the same instance in all pageObjects classe
body: <pre><code>public class Base
  {
  
      public WebDriver driver;
  
      public void initializeDriver()
      {
          driver=new FirefoxDriver();
      }
  }
  
  public class Page extends Base
  {
  
      Page(WebDriver driver)
      {
          this.driver=driver;
      }
  
      @Test
      public void testPage() 
      {
         driver.get("https://www.google.co.in/");
      }
  }
  </code></pre>
  
  <p><strong>In Page Class</strong></p>
  
  <p>Why we need the constructor in each page class that extends the base class. What is the purpose of this constructor and how it works.
  I am confused with the use of constructor in page class.Please help me to understand its working here.Thanks in advance..</p>