1

Using protractor, I want to load an external url (e.g. https://www.stackoverflow.com/) after performing some actions on an angular page. If I try with the following code snippet, it hangs the test execution completely

browser.waitForAngularEnabled(false);
browser.driver.get('https://www.stackoverflow.com/');

Can anyone please help me out what might be going wrong here?

Sitam Jana
  • 3,123
  • 2
  • 21
  • 40
  • Possible duplicate of [how to use Protractor on non angularjs website?](https://stackoverflow.com/questions/20927652/how-to-use-protractor-on-non-angularjs-website) – Anand Jan 17 '18 at 09:30

1 Answers1

1

You can try to push the function in control flow. try with below

// disable synchronization

browser.controlFlow().execute(function() {
  browser.ignoreSynchronization = true;
});

// execute your non-angular part

browser.get('https://www.stackoverflow.com/');

// enable synchronization again for back to angular page.

browser.controlFlow().execute(function() {
  browser.ignoreSynchronization = false;
});
tyaga001
  • 169
  • 2
  • 11