 <p>So if you only need to check that a new window is open:</p> <pre><code>int oldWindowCount = driver.getWindowHandles().size(); driver.findElement(&lt;By locator for hyperlink here&gt;).click(); int newWindowCount = driver.getWindowHandles().size(); Assert.assertEquals(1, newWindowCount - oldWindowCount); </code></pre> <p>Assuming you have no more than two windows open, if you want to switch between your current window and the new one:</p> <pre><code>String oldWindow = driver.getWindowHandle(); driver.findElement(&lt;By locator for hyperlink here&gt;).click(); for (String handle : driver.getWindowHandles()) { if (!handle.equals(oldWindow)) { driver.switchTo().window(handle); } } </code></pre>