Skip to content

Commit 03c4fc9

Browse files
committed
Handling exception that occurs in htmlunit driver
1 parent 45dc056 commit 03c4fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/client/test/org/openqa/selenium/WindowSwitchingTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ protected void finished(Description description) {
6868
if (! mainWindow.equals(driver.getWindowHandle())) {
6969
driver.close();
7070
}
71+
driver.switchTo().window(mainWindow);
7172
} catch (Exception ignore) {
7273
}
73-
driver.switchTo().window(mainWindow);
7474
super.finished(description);
7575
}
7676
};

0 commit comments

Comments
 (0)