// switch focus of WebDriver to the next found window handle (that your newly opened window)
for (String winHandle : driver.getWindowHandles()) driver.switchTo().window(winHandle);
// switch focus of WebDriver to the next found window handle (that your newly opened window)
for (String winHandle : driver.getWindowHandles()) driver.switchTo().window(winHandle);