question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

multiple browser.waitForAngularEnabled in a method not working

See original GitHub issue

Hi there!

  • Node Version: 10.15.0
  • Protractor Version: 6.0.0-beta
  • Angular Version: 4.3.0
  • Browser(s): chrome
  • Operating System and Version Windows 10

I have methods I call where I was previously ran using multiple ignoreSynchronization but I switch to waitForAngularEnabled from within my test and I get the following output based on the same function below.

[2019-02-07T11:18:44.618] [INFO] VClientActions.login - a1: true [2019-02-07T11:18:44.622] [INFO] VClientActions.login - a2: true

I would assume a2 would equal false after browser.waitForAngularEnabled(false); is called.

`login(): void { // Get the page browser.waitForAngularEnabled().then((a1: any) => { logger.info('a1: ’ + a1);

  browser.waitForAngularEnabled(false);
  browser.waitForAngularEnabled().then((a2: any) => {
    logger.info('a2: ' + a2);
  });
});`

Subsequently: in 5.4 if I run log (browser.ignoreSynchronization); browser.ignoreSynchronization = true; log (browser.ignoreSynchronization);

I get ‘false’ followed by ‘true’

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
cnishinacommented, Feb 8, 2019

It looks like I can close this. waitForAngularEnabled when getting and setting should be awaited. If this is still an issue please feel free to open. @GitSage thank you for your responses.

0reactions
tfaroncommented, Feb 8, 2019

Thanks I’ll give it a try, appreciate the help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How does waitForAngularEnabled work? - Stack Overflow
Protractor's waitForAngular strategy considers that the current page has AngularJS library and calls the getTestabilityAPI method on global ...
Read more >
Chapter 9: Understanding timeouts - Testing Angular ...
To fix the error, you need to tell Protractor not to wait for Angular: it('should be able to log in', () => {...
Read more >
Performing Cross Browser Automated Testing - QSS Technosoft
Cross -browser testing is basically running the same set of test cases multiple times on different browsers. This type of repeated task is...
Read more >
Testing with Protractor: how to fix synchronization issues
For each part of the app that isn't written using Angular, use the following function: browser.waitForAngularEnabled(false);. Also, don't forget ...
Read more >
angular/protractor - Gitter
i'm trying the below code, but it was not working because is not clicking on the element that I want this.removeAllBanners = function...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found