code: public static <T> T initElements(WebDriver driver, Class<T> pageClassToProxy) {
      T page = instantiatePage(driver, pageClassToProxy);
      initElements(driver, page);
      return page;
    }
docs: Instantiate an instance of the given class, and set a lazy proxy for each of the WebElement and
  List&lt;WebElement&gt; fields that have been declared, assuming that the field
  name is also the HTML element's "id" or "name". This means that for the class:
  
  <code> public class Page { private WebElement submit; } </code>
  
  there will be an element that can be located using the xpath expression "//*[@id='submit']" or
  "//*[@name='submit']"
  
  By default, the element or the list is looked up each and every time a method is called upon
  it. To change this behaviour, simply annotate the field with the {@link CacheLookup}. To change
  how the element is located, use the {@link FindBy} annotation.
  
  This method will attempt to instantiate the class given to it, preferably using a constructor
  which takes a WebDriver instance as its only argument or falling back on a no-arg constructor.
  An exception will be thrown if the class cannot be instantiated.
  
  @param driver           The driver that will be used to look up the elements
  @param pageClassToProxy A class which will be initialised.
  @param <T>              Class of the PageObject
  @return An instantiated instance of the class with WebElement and List&lt;WebElement&gt;
  fields proxied
  @see FindBy
  @see CacheLookup