title: selenium iframe element not found
body: <p>I am trying to automate logging into <a href="http://wallethub.com/" rel="nofollow">http://wallethub.com/</a> using selenium java code.
  After clicking on Sign in link, a modal popup comes up with an iframe containing username and password fields, however I am not able to find the username field using following selenium code.</p>
  
  <pre><code>WebDriver d = new FirefoxDriver();
  d.get("http://wallethub.com/profile/test_insurance_company/");
  WebElement signIn = d.findElement(By.linkText("Sign In"));
  signIn.click();
  
  WebElement frame = d.findElement(By.tagName("iframe"));
  
  WebDriver.TargetLocator locator =  d.switchTo();
  WebDriver frameDriver = locator.frame(frame);
  WebElement active = locator.activeElement();
  frameDriver.findElement(By.id("overlay-username")).sendKeys(user);
  </code></pre>
  
  <p>My code dies on the last line saying cannot find "overlay-username" field, however I have verified , this field exists in firebug console. </p>
  
  <p>This is on linux.</p>
  
  <p>Any help will be appreciated.</p>