title: sendKeys() in Selenium web driver
body: <p>I am new to <em>Selenium</em>. I just want to send keys to a username text box and send a tab key both at a time so that text box can check for availability of username.</p>
  
  <p>Here is the code:</p>
  
  <pre><code> driver.findElement(By.xpath("//label[text()='User Name:']/following::div/input")).sendKeys("UserName");
   driver.findElement(By.xpath("//label[text()='User Name:']/following::div/input")).sendKeys(Keys.TAB);
  </code></pre>
  
  <p>But this one is not working.</p>