Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(navigation): revert changes to the page reset
Browse files Browse the repository at this point in the history
Navigating to an empty data URL won't work for internet explorer, sadly.

Reverting to about:blank. Will watch for flakes and explore other options.
  • Loading branch information
juliemr committed May 21, 2014
1 parent a8f4cd9 commit 59533d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ Protractor.prototype.get = function(destination, opt_timeout) {
return this.driver.get(destination);
}

this.driver.get('data:text/html,<html></html>');
this.driver.get('about:blank');
this.driver.executeScript(
'window.name = "' + DEFER_LABEL + '" + window.name;' +
'window.location.replace("' + destination + '");');
Expand All @@ -908,7 +908,7 @@ Protractor.prototype.get = function(destination, opt_timeout) {
// we try to execute any asynchronous scripts.
this.driver.wait(function() {
return self.driver.executeScript('return window.location.href;').then(function(url) {
return url !== 'data:text/html,<html></html>';
return url !== 'about:blank';
});
}, timeout * 1000, 'Timed out waiting for page to load');

Expand Down

0 comments on commit 59533d9

Please sign in to comment.