title: How to handle Pop-up in Selenium WebDriver using Java
body: <p>I want to handle sign-in part in rediff.com, but the below code doesn't work for that:</p>
  
  <pre><code>driver.get("http://www.rediff.com/");
  WebElement sign = driver.findElement(By.xpath("//html/body/div[3]/div[3]/span[4]/span/a"));
  sign.click();
  String myWindowHandle = driver.getWindowHandle();
  driver.switchTo().window(myWindowHandle);
  WebElement email_id= driver.findElement(By.xpath("//*[@id='signin_info']/a[1]"));
  email_id.sendKeys("hi");
  </code></pre>
  
  <p>If <code>myWindowHandle</code> is not the correct string, then let me know how to get the pop-up Window name, because I can't find the name of the pop-up window.</p>