Selenium Java - Handling Windows, Frames, and Alerts
Find the mistake in this code snippet that switches back to the main window:
String mainWindow = driver.getWindowHandle(); // some code opens new window driver.switchTo().window(mainWindow); driver.close();
