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.
How can I achive this in Selenium web driver?