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

Commit d15ccdc

Browse files
Carlos Granadossjelin
Carlos Granados
authored andcommitted
fix(phantomJS): Reset URL cannot be a data url for PhantomJS
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
1 parent e6369ac commit d15ccdc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/protractor.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,9 @@ var Protractor = function(webdriverInstance, opt_baseUrl, opt_rootElement) {
192192
// Internet Explorer does not accept data URLs, which are the default
193193
// reset URL for Protractor.
194194
// Safari accepts data urls, but SafariDriver fails after one is used.
195+
// PhantomJS produces a "Detected a page unload event" if we use data urls
195196
var browserName = caps.get('browserName');
196-
if (browserName === 'internet explorer' || browserName === 'safari') {
197+
if (browserName === 'internet explorer' || browserName === 'safari' || browserName === 'phantomjs') {
197198
self.resetUrl = 'about:blank';
198199
}
199200
});

0 commit comments

Comments
 (0)