title: Verification of Active element by WebDriver using java
body: <p>During sign in on Yahoo mail, cursor is focused on Yahoo ID text field automatically. I want to verify whether cursor is focused or not on Yahoo ID text field. HTML for the text field is below:</p>
  
  <pre><code>&lt;input name="login" id="username" maxlength="96" tabindex="1" value=""&gt;
  </code></pre>
  
  <p>How can I verify that Yahoo ID text field is focused or active?
  BTW, I am using WebDriver (Selenium 2) with java, TestNG as test framework</p>