title: How to switch back to main window after handling alert in Selenium Web Driver
body: <p>I have to write a selenium automation test script , where test has to create a template that fills up Generalize data in form and enter specific details manually(trying to wait here till manual entry is finished) and then click on SAVE button. However if some of mandatory field is left the system shows JavaScript's validation alert. I am handling this alert by using
       Alert alert = driver.switchTo().alert();
        alert.accept();
  After this I want to get back to main page and wait for several minutes to write the description for missing fields and now click on SAVE button.</p>
  
  <p>How can I achive this in Selenium web driver?</p>