@@ -8,7 +8,7 @@ exports.wrapDriver = function(webdriver) {
88 moduleNames = [ ] ,
99 moduleScripts = [ ] ;
1010
11- var PROTRACTOR_URL_LABEL = '_WAITFORMODULES ' ;
11+ var DEFER_LABEL = 'NG_DEFER_BOOTSTRAP! ' ;
1212
1313 var waitForAngular = function ( ) {
1414 return driver . executeAsyncScript ( function ( ) {
@@ -45,11 +45,10 @@ exports.wrapDriver = function(webdriver) {
4545 * protractor.get('foo.com');
4646 */
4747 get : function ( destination ) {
48- var parsed = url . parse ( destination ) ;
49- parsed . hash = ( parsed . hash ? parsed . hash : '#' ) + PROTRACTOR_URL_LABEL ;
50- var modifiedUrl = url . format ( parsed ) ;
51- driver . get ( modifiedUrl ) ;
52- // At this point, Angular will pause for us, until angular.resumeBootstrapWithExtraModules is called.
48+ driver . get ( 'about:blank' ) ;
49+ driver . executeScript ( 'window.name += "' + DEFER_LABEL + '";' +
50+ 'window.location.href = "' + destination + '"' ) ;
51+ // At this point, Angular will pause for us, until angular.resumeBootstrap is called.
5352
5453 for ( var i = 0 ; i < moduleScripts . length ; ++ i ) {
5554 driver . executeScript ( moduleScripts [ i ] ) ; // Should this be async?
@@ -58,7 +57,7 @@ exports.wrapDriver = function(webdriver) {
5857 driver . executeAsyncScript ( function ( ) {
5958 var callback = arguments [ arguments . length - 1 ] ;
6059 // Continue to bootstrap Angular.
61- angular . resumeBootstrapWithExtraModules ( arguments [ 0 ] ) ;
60+ angular . resumeBootstrap ( arguments [ 0 ] ) ;
6261 callback ( ) ;
6362 } , moduleNames ) ;
6463 }
0 commit comments