title: Selenium Webdriver and PageFactory initialize List<WebElement> elements
body: <p>I have searched the Selenium Webdriver APi docs hosted on google code. Currently using the PageFactory to initlize my Page objects, but having issue initilizing a list of WebElement.</p>
  
  <p>What I need is a way to initialize a list of elements, ideally a list of drop-down select boxes. </p>
  
  <p>I have looked at the API references to @Findsby and @ByChained but still can not figure out the best way to initlize a list of dropdown select boxes. I COULD have a seperate WebElement for each one and grab the ID but I would like to initlize a list of List selects</p>
  
  <h3>Currently I use the following:</h3>
  
  <pre><code>public class PageObject {
  
          @FindBy(id="element_id")
          private WebElement element;
  
          public getElement() {
            return element;
          }
  }
  </code></pre>
  
  <h3>Is there some way I can use something similar to the following that I seek:</h3>
  
  <pre><code>public class PageObject {   
  
      @FindBys(className="selectItmes")
      private List&lt;WebElement&gt; selects;
  
      public List&lt;WebElement&gt; getSelects() {
        return selects;
      }  
  }
  </code></pre>
  
  <p>Or must I use a single Web Element for each element? :(</p>
  
  <h1>Update</h1>
  
  <p>Anyone know how to use the PageFactory and initlize a List elements; using the FindsBy annotation. I can't find any way of doing this yet there are google issues on the selenium google docs site saying this has been fixed in the Java api bindings and in version 2.12 as it was mistaken disabled in 2.11.... I still can't initialize a list. =/</p>