Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The method for returning to the previous window in Selenium WebDriver is driver.switchTo().window(previousWindowHandle). The previous window handle can be stored in a variable before switching to a new window.