title: WebDriver PageFactory Find Elements List
body: <p>I have multiple elements on a page and I would like to initialize them using PageFactory.</p>
  
  <p>I have tried using following</p>
  
  <pre><code>@FindBy(xpath = "//*[contains(@class,'x-grid-tree-node-leaf')]")    
      List&lt;WebElement&gt; allElements;
  </code></pre>
  
  <p>but this returns only one element.</p>
  
  <p>now, if I use the traditional way for finding elements</p>
  
  <pre><code>List&lt;WebElement&gt; allElements = driver.findElements(By.xpath("//*[contains(@class,'x-grid-tree-node-leaf')]"));
  </code></pre>
  
  <p>this returns 4 elements</p>
  
  <p>any pointers what could be the issue?</p>