title: Set focus on WebElement?
body: <p>i'm currently testing the GUI of my application, and i wanted to know if it's possible to set the focus to a WebElement ?</p>
  
  <p>I'm using Selenium 2.0 and the webdriver.</p>
  
  <p>So i'm looking for something like that : <code>driver.findElement(xxxx).setfocus();</code></p>
  
  <p>Thank you.</p>
  
  <p>EDIT :
  I've alreardy tested that kind of tricky things</p>
  
  <pre><code>// getting the element WebElement 
  eSupplierSuggest = driver.findElement(By.xpath("..."));
  
  //get le location and click 
  Point location = eSupplierSuggest.getLocation();
  new Actions(driver).moveToElement(eSupplierSuggest, location.x, location.y).click();
  
  //or
  
  //directly perform
  new Actions(driver).moveToElement(eSupplierSuggest).click().perform();
  </code></pre>
  
  <p>i red somewhere that the click focus the element, but in my case, nothing works. lol</p>
  
  <p>PS : this is a sub-question of that original post <a href="https://stackoverflow.com/questions/15780909/click-on-a-suggestbox-webdriver">Click on a suggestbox, webdriver</a></p>