1

I'm doing e2e tests for Angular application. For login procedure it should go out of the app, so I'm doing:

 browser.waitForAngularEnabled(false);
 //login
 browser.waitForAngularEnabled(true);

It perfectly works locally, but on browserstack (remote execution) it throughs and error:

Failed: protractor_1.browser.waitForAngularEnabled is not a function

Is it known issue?

related question - How does waitForAngularEnabled work?

Update: created an issue on protractor github - https://github.com/angular/protractor/issues/4453

Stepan Suvorov
  • 25,118
  • 26
  • 108
  • 176
  • I have the same issue. Did you ever solve it? Everything was working fine for me, then I did some refactoring of my grunt build system and I started to see this error. Then I reverted back to original build state and I still get the error.... – Brian Aug 18 '17 at 18:39
  • not yes, switched to another thing but will return back soon – Stepan Suvorov Aug 19 '17 at 10:04
  • I still don't know the exact problem yet, but happened for me after I installed a new npm package, that transitively brought in many other packages. One of them I noticed was selenium webdriver. So I guess there is some kind of conflicting versions or something, I reverted by npm install and my tests run fine again now. – Brian Aug 20 '17 at 17:56

1 Answers1

2

The reason why it's not working on your browserstack service is that Protractor 4 doesn't support waitForAngularEnabled(). That method is not implemented in Protractor 4. It's implemented on Protractor 5.

Have you installed Protractor global on your local machine and perhaps have version 5.x.x?

If you want to use it in version 4 your should use browser.ignoreSynchronisation = true|false, see here

wswebcreation
  • 2,365
  • 2
  • 10
  • 18