title: selecting list value by index number using selenium java
body: <p>I tried using the <code>select()</code> method in my code, but Eclipse is showing an error. Is <code>select()</code> an inbuilt method of Selenium? I don't get it.</p>
  
  <pre><code>select(driver2.findElement(By.xpath("//*@id='webLossReport.contact.address.state']")),index=i);
  </code></pre>
  
  <p>Eclipse says <code>"The method select(WebElement, int) is undefined for the type entry"</code> and it is giving me an option to create a method in this class.</p>
  
  <p>Please let me know how others are using it. My requirement is to "select a list value based on Index number"</p>
  
  <p>Update: Code Posted as requested,</p>
  
  <pre><code>WebElement LSD = driver2.findElement(By.xpath("//select[@id='webLossReport.lossInformation.locationOfLoss.state']"));
  List &lt;WebElement&gt; LLS = LossStateDropdown.findElements(By.tagName("option"));
  
  int i= LLS.size();      
  select(driver2.findElement(By.xpath("//*@id='webLossReport.contact.address.state']")),index=i);
  </code></pre>