@@ -324,7 +324,7 @@ export class ProtractorBrowser extends Webdriver {
324324 this . $ = build$ ( this . element , By ) ;
325325 this . $$ = build$$ ( this . element , By ) ;
326326 this . baseUrl = opt_baseUrl || '' ;
327- this . rootEl = opt_rootElement || 'body ' ;
327+ this . rootEl = opt_rootElement || '' ;
328328 this . ignoreSynchronization = false ;
329329 this . getPageTimeout = DEFAULT_GET_PAGE_TIMEOUT ;
330330 this . params = { } ;
@@ -492,13 +492,10 @@ export class ProtractorBrowser extends Webdriver {
492492 let runWaitForAngularScript : ( ) => wdpromise . Promise < any > = ( ) => {
493493 if ( this . plugins_ . skipAngularStability ( ) || this . bpClient ) {
494494 return wdpromise . fulfilled ( ) ;
495- } else if ( this . rootEl ) {
496- return this . executeAsyncScript_ (
497- clientSideScripts . waitForAngular , 'Protractor.waitForAngular()' + description ,
498- this . rootEl , this . ng12Hybrid ) ;
499495 } else {
500496 return this . executeAsyncScript_ (
501- clientSideScripts . waitForAllAngular2 , 'Protractor.waitForAngular()' + description ) ;
497+ clientSideScripts . waitForAngular , 'Protractor.waitForAngular()' + description ,
498+ this . rootEl ) ;
502499 }
503500 } ;
504501
@@ -805,7 +802,9 @@ export class ProtractorBrowser extends Webdriver {
805802 }
806803
807804 self . executeScriptWithDescription (
808- 'angular.resumeBootstrap(arguments[0]);' , msg ( 'resume bootstrap' ) , moduleNames )
805+ 'window.__TESTABILITY__NG1_APP_ROOT_INJECTOR__ = ' +
806+ 'angular.resumeBootstrap(arguments[0]);' ,
807+ msg ( 'resume bootstrap' ) , moduleNames )
809808 . then ( null , deferred . reject ) ;
810809 } else {
811810 // TODO: support mock modules in Angular2. For now, error if someone
0 commit comments