@@ -343,7 +343,6 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver {
343
343
this . ignoreSynchronization = false ;
344
344
this . getPageTimeout = DEFAULT_GET_PAGE_TIMEOUT ;
345
345
this . params = { } ;
346
- this . ready = null ;
347
346
this . plugins_ = new Plugins ( { } ) ;
348
347
this . resetUrl = DEFAULT_RESET_URL ;
349
348
this . debugHelper = new DebugHelper ( this ) ;
@@ -365,17 +364,21 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver {
365
364
ng12Hybrid_ = ng12Hybrid ;
366
365
}
367
366
} ) ;
368
- this . driver . getCapabilities ( ) . then ( ( caps : Capabilities ) => {
369
- // Internet Explorer does not accept data URLs, which are the default
370
- // reset URL for Protractor.
371
- // Safari accepts data urls, but SafariDriver fails after one is used.
372
- // PhantomJS produces a "Detected a page unload event" if we use data urls
373
- let browserName = caps . get ( 'browserName' ) ;
374
- if ( browserName === 'internet explorer' || browserName === 'safari' ||
375
- browserName === 'phantomjs' || browserName === 'MicrosoftEdge' ) {
376
- this . resetUrl = 'about:blank' ;
377
- }
378
- } ) ;
367
+ this . ready = this . driver . controlFlow ( )
368
+ . execute ( ( ) => {
369
+ return this . driver . getSession ( ) ;
370
+ } )
371
+ . then ( ( session : Session ) => {
372
+ // Internet Explorer does not accept data URLs, which are the default
373
+ // reset URL for Protractor.
374
+ // Safari accepts data urls, but SafariDriver fails after one is used.
375
+ // PhantomJS produces a "Detected a page unload event" if we use data urls
376
+ let browserName = session . getCapabilities ( ) . get ( 'browserName' ) ;
377
+ if ( browserName === 'internet explorer' || browserName === 'safari' ||
378
+ browserName === 'phantomjs' || browserName === 'MicrosoftEdge' ) {
379
+ this . resetUrl = 'about:blank' ;
380
+ }
381
+ } ) ;
379
382
380
383
this . trackOutstandingTimeouts_ = ! opt_untrackOutstandingTimeouts ;
381
384
this . mockModules_ = [ ] ;
0 commit comments