In trying to understand the method Protractor uses to determine whether or not angular has completed (protractor/lib/clientsidescripts.js) I come across an error ,

TypeError: a is not a function
http://localhost:7000/testapp/lib/angular_v1.2.9/angular.min.js
Line 34

I am running a local server, viewing the Protractor test page testapp/#/async, and running the following lines from the Firebug console

var el = document.querySelector('body');
angular.element(el).injector().get('$browser').notifyWhenNoOutstandingRequests('return;');

This is essentially, as far as I can tell, the core of Protractor's waiting for Angular functionality which is used throughout the end-to-end testing tool - except for the 'return;' part. Within the protractor library this is a callback function but looking at its usage I don't see a callback function so I have tried a few things here including no callback function.

I do see the the try catch statements around this code but I am assuming it is not trying to catch the 'a is not a function' error I am seeing but an error from the call such as "Error: we still have outstanding requests!". I understand I am trying something unusual but I am trying to understand how protractor is waiting. If I am creating this error myself by doing something totally offbase I would appreciate anyone pointing out my stupidity. Thanks.

Ed

--
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to