@@ -394,7 +394,6 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver {
394
394
this . ignoreSynchronization = false ;
395
395
this . getPageTimeout = DEFAULT_GET_PAGE_TIMEOUT ;
396
396
this . params = { } ;
397
- this . ready = null ;
398
397
this . plugins_ = new Plugins ( { } ) ;
399
398
this . resetUrl = DEFAULT_RESET_URL ;
400
399
this . debugHelper = new DebugHelper ( this ) ;
@@ -416,17 +415,22 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver {
416
415
ng12Hybrid_ = ng12Hybrid ;
417
416
}
418
417
} ) ;
419
- this . driver . getCapabilities ( ) . then ( ( caps : Capabilities ) => {
420
- // Internet Explorer does not accept data URLs, which are the default
421
- // reset URL for Protractor.
422
- // Safari accepts data urls, but SafariDriver fails after one is used.
423
- // PhantomJS produces a "Detected a page unload event" if we use data urls
424
- let browserName = caps . get ( 'browserName' ) ;
425
- if ( browserName === 'internet explorer' || browserName === 'safari' ||
426
- browserName === 'phantomjs' || browserName === 'MicrosoftEdge' ) {
427
- this . resetUrl = 'about:blank' ;
428
- }
429
- } ) ;
418
+ this . ready = this . driver . controlFlow ( )
419
+ . execute ( ( ) => {
420
+ return this . driver . getSession ( ) ;
421
+ } )
422
+ . then ( ( session : Session ) => {
423
+ // Internet Explorer does not accept data URLs, which are the default
424
+ // reset URL for Protractor.
425
+ // Safari accepts data urls, but SafariDriver fails after one is used.
426
+ // PhantomJS produces a "Detected a page unload event" if we use data urls
427
+ let browserName = session . getCapabilities ( ) . get ( 'browserName' ) ;
428
+ if ( browserName === 'internet explorer' || browserName === 'safari' ||
429
+ browserName === 'phantomjs' || browserName === 'MicrosoftEdge' ) {
430
+ this . resetUrl = 'about:blank' ;
431
+ }
432
+ return this ;
433
+ } ) ;
430
434
431
435
this . trackOutstandingTimeouts_ = ! opt_untrackOutstandingTimeouts ;
432
436
this . mockModules_ = [ ] ;
0 commit comments