diff --git a/lib/protractor.js b/lib/protractor.js index c3d080eea..120d71d5e 100644 --- a/lib/protractor.js +++ b/lib/protractor.js @@ -572,13 +572,13 @@ Protractor.prototype.waitForAngular = function() { var timeout; if (/asynchronous script timeout/.test(err.message)) { // Timeout on Chrome - timeout = /[\d\.]*\ seconds/.exec(err.message); + timeout = /-?[\d\.]*\ seconds/.exec(err.message); } else if (/Timed out waiting for async script/.test(err.message)) { // Timeout on Firefox - timeout = /[\d\.]*ms/.exec(err.message); + timeout = /-?[\d\.]*ms/.exec(err.message); } else if (/Timed out waiting for an asynchronous script/.test(err.message)) { // Timeout on Safari - timeout = /[\d\.]*\ ms/.exec(err.message); + timeout = /-?[\d\.]*\ ms/.exec(err.message); } if (timeout) { throw 'Timed out waiting for Protractor to synchronize with ' +