title: Unable to switch back to the parent window from the popup frame using selenium webdriver
body: <p>I have the login page, when click login its opens the new tab. I moved the control to new tab using</p>
  
  <pre><code>driver.switchTo().window("");
  // Done some stuffs in new window.
  </code></pre>
  
  <p>when I click one Button it will open the popup (frame).</p>
  
  <p>I have selected a popup window using <code>driver.switchTo().frame("frameName");</code> </p>
  
  <p>and from there by selecting the record, the popup window will be closed. The selected record will be displayed in parent window and the page got refreshed. </p>
  
  <p>Now I want to return(Re-Focus) the control to my parent window for doing the some other stuffs.</p>
  
  <p>but I could not focus the parent window again.</p>
  
  <p>I have tried:</p>
  
  <pre><code>driver.switchTo().defaultcontent();
  driver.switchTo().window("");
  </code></pre>
  
  <p>and   </p>
  
  <pre><code>driver.getWindowHandles();
  </code></pre>
  
  <p>Still the same result....</p>
  
  <p>Could anyone please help me on this....</p>