title: Selenium: How can I navigate back to parent window
body: <p>I am running below java code for switching windows and getting error message, Kindly suggest something.</p>
  
  <pre><code>Driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL +"t");
      Set&lt;String&gt;set=Driver.getWindowHandles();
      Iterator&lt;String&gt; It=set.iterator();
      String PId=It.next();
      String CId=It.next();
      Driver.switchTo().window(CId);
  
  
      Driver.get("https://www.facebook.com");/* Here again I want to come back to parent window and perform some action */
  </code></pre>