@@ -401,8 +401,11 @@ Protractor.prototype.waitForAngular = function(opt_description) {
401
401
}
402
402
if ( timeout ) {
403
403
var errMsg = 'Timed out waiting for Protractor to synchronize with ' +
404
- 'the page after ' + timeout + '. Please see ' +
405
- 'https://github.com/angular/protractor/blob/master/docs/faq.md' ;
404
+ 'the page after ' + timeout + '. Please see ' +
405
+ 'https://github.com/angular/protractor/blob/master/docs/faq.md' ;
406
+ if ( description . startsWith ( ' - Locator: ' ) ) {
407
+ errMsg += '\n' + description
408
+ } ;
406
409
var pendingTimeoutsPromise ;
407
410
if ( self . trackOutstandingTimeouts_ ) {
408
411
pendingTimeoutsPromise = self . executeScript_ (
@@ -426,14 +429,14 @@ Protractor.prototype.waitForAngular = function(opt_description) {
426
429
var key , pendingTasks = [ ] ;
427
430
for ( key in pendingTimeouts ) {
428
431
if ( pendingTimeouts . hasOwnProperty ( key ) ) {
429
- pendingTasks . push ( '- $timeout: ' + pendingTimeouts [ key ] ) ;
432
+ pendingTasks . push ( ' - $timeout: ' + pendingTimeouts [ key ] ) ;
430
433
}
431
434
}
432
435
for ( key in pendingHttps ) {
433
- pendingTasks . push ( '- $http: ' + pendingHttps [ key ] . url ) ;
436
+ pendingTasks . push ( ' - $http: ' + pendingHttps [ key ] . url ) ;
434
437
}
435
438
if ( pendingTasks . length ) {
436
- errMsg += '. The following tasks were pending:\n' ;
439
+ errMsg += '. \nThe following tasks were pending:\n' ;
437
440
errMsg += pendingTasks . join ( '\n' ) ;
438
441
}
439
442
throw errMsg ;
0 commit comments