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

Commit

Permalink
fix(phantomJS): Reset URL cannot be a data url for PhantomJS
Browse files Browse the repository at this point in the history
When trying to use the lates version of Angular with PhantomJS we get a message complaining about "Detected a page unload event". This was fixed in earlier versions of Angular, see issue #85, but reappeared now. The problem is that using data urls to reset the page causes this issue, so we have to do as we do with Safari and use "about:blank" instead
  • Loading branch information
Carlos Granados authored and sjelin committed Jul 9, 2015
1 parent e6369ac commit d15ccdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ var Protractor = function(webdriverInstance, opt_baseUrl, opt_rootElement) {
// Internet Explorer does not accept data URLs, which are the default
// reset URL for Protractor.
// Safari accepts data urls, but SafariDriver fails after one is used.
// PhantomJS produces a "Detected a page unload event" if we use data urls
var browserName = caps.get('browserName');
if (browserName === 'internet explorer' || browserName === 'safari') {
if (browserName === 'internet explorer' || browserName === 'safari' || browserName === 'phantomjs') {
self.resetUrl = 'about:blank';
}
});
Expand Down

0 comments on commit d15ccdc

Please sign in to comment.