0

Hi protractor experts,

I'm a new user for protractor. I try to use protractor to do the E2E automation testing for our application (AngularJS application), seems protractor don't think our application is AngularJS application:

Message:
     Error: Angular could not be found on the page https://localhost/ : retries looking for angular exceeded    Stacktrace:
     Error: Angular could not be found on the page https://localhost/ : retries looking for angular exceeded
    at Array.forEach (native)
    at runMicrotasksCallback (node.js:337:7)
    at process._tickCallback (node.js:355:11) From: Task: Asynchronous test function: beforeEach() Error
    at [object Object].<anonymous> (/Users/tfeng/Desktop/protractor/addUser.js:6:5)
    at Object.<anonymous> (/Users/tfeng/Desktop/protractor/addUser.js:2:1)

Our application does not contains tag in head, we packaged AngularJS in our application. So I'd like to know how protractor check the application is AngularJS or non-AngularJS?

Thanks, Tony

  • Are you sure that angular is being loaded properly on your app? The error message you're getting indicates that protractor couldn't find an `angular` property on the `window` object – sjelin Jul 15 '15 at 15:42
  • Hi sjelin, Thank you for your comment! Yes, you are right! The error is for the login page of our application, our login is not using AngularJS, but other pages are using AngularJS. How can I use protractor to do the E2E testing on our application? Seems login is the first thing on my test cases. Do you have any idea for that? Thanks, – Tony-Wei Feng Jul 16 '15 at 13:42
  • 1
    We have a non angular login page and i have to call browser.ignoreSynchronization = true; at the start of the it block that interacts with the form , just remember to set browser.ignoreSynchronization = false; after your done with the non angular page – Sirk Jul 16 '15 at 14:45
  • Thank you Sirk, I will have a try. – Tony-Wei Feng Jul 20 '15 at 09:43

0 Answers0