public void FailingToSwitchToAWindowLeavesTheCurrentWindowAsIs()
{
driver.Url = xhtmlTestPage;
String current = driver.GetWindowHandle();
try
{
driver.SwitchTo().Window("i will never exist");
Assert.Fail("Should not be ablt to change to a non-existant window");
}
catch (NoSuchWindowException)
{
// expected
}
String newHandle = driver.GetWindowHandle();
Assert.AreEqual(current, newHandle);
}