Skip to content

Commit

Permalink
Handling possible exception in stringification of window.location. Fi…
Browse files Browse the repository at this point in the history
…xes issue 3908
  • Loading branch information
barancev committed Jul 3, 2014
1 parent 00f9afe commit 5ef0217
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions javascript/selenium-core/scripts/selenium-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -1189,10 +1189,15 @@ Selenium.prototype.doWaitForPopUp = function(windowID, timeout) {
throw e;
}
}

if (!targetWindow) return false;
if (!targetWindow.location) return false;
if ("about:blank" == targetWindow.location) return false;
try {
if (!targetWindow.location) return false;
if ("about:blank" == targetWindow.location) return false;
} catch (e) {
LOG.debug("Location exception (" + e.message + ")!");
return false;
}
if (browserVersion.isKonqueror) {
if ("/" == targetWindow.location.href) {
// apparently Konqueror uses this as the temporary location, instead of about:blank
Expand Down

0 comments on commit 5ef0217

Please sign in to comment.