This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 1 file changed +16
-4
lines changed
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -411,12 +411,24 @@ Protractor.prototype.waitForAngular = function() {
411
411
'sync with the page: ' + JSON . stringify ( browserErr ) ;
412
412
}
413
413
} ) . then ( null , function ( err ) {
414
- if ( ! / a s y n c h r o n o u s s c r i p t t i m e o u t / . test ( err . message ) ) {
414
+ var timeout ;
415
+ if ( / a s y n c h r o n o u s s c r i p t t i m e o u t / . test ( err . message ) ) {
416
+ // Timeout on Chrome
417
+ timeout = / [ \d \. ] * \ s e c o n d s / . exec ( err . message ) ;
418
+ } else if ( / T i m e d o u t w a i t i n g f o r a s y n c s c r i p t / . test ( err . message ) ) {
419
+ // Timeout on Firefox
420
+ timeout = / [ \d \. ] * m s / . exec ( err . message ) ;
421
+ } else if ( / T i m e d o u t w a i t i n g f o r a n a s y n c h r o n o u s s c r i p t / . test ( err . message ) ) {
422
+ // Timeout on Safari
423
+ timeout = / [ \d \. ] * \ m s / . exec ( err . message ) ;
424
+ }
425
+ if ( timeout ) {
426
+ throw 'Timed out waiting for Protractor to synchronize with ' +
427
+ 'the page after ' + timeout + '. Please see ' +
428
+ 'https://github.com/angular/protractor/blob/master/docs/faq.md' ;
429
+ } else {
415
430
throw err ;
416
431
}
417
- var timeout = / [ \d \. ] * \ s e c o n d s / . exec ( err . message ) ;
418
- throw 'Timed out waiting for Protractor to synchronize with ' +
419
- 'the page after ' + timeout ;
420
432
} ) ;
421
433
} ;
422
434
You can’t perform that action at this time.
0 commit comments