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.

Forked driver instance ignores waitForAngularEnabled

See original GitHub issue

Bug report

  • Node Version: 6.10.0
  • Protractor Version: 5.11
  • Angular Version: n/a
  • Browser(s): Chrome
  • Operating System and Version OS X 10.11.6
  • Test framework: mocha

After upgrading from v4.0.14 to v5.1.1 all tests using browser.forkNewDriverInstance() started to fail. I tried using waitForAngularEnabled instead of ignoreSynchronization but got the same result.

Example test:

it('', () => {
    const otherBrowser = browser.forkNewDriverInstance();
    otherBrowser.ignoreSynchronization = true;
    return otherBrowser.get('https://google.com')
      .then(() => otherBrowser.$('body').isDisplayed())
      .then(isDisplayed => expect(isDisplayed).to.be.true);
  });

Error:

Error while waiting for Protractor to sync with the page: "window.angular is undefined.  This could be either because this is a non-angular page or because your test involves client-side navigation, which can interfere with Protractor's bootstrapping.  See http://git.io/v4gXM for details"

Edit It only happens when using mocha

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:12
  • Comments:9

github_iconTop GitHub Comments

3reactions
annu13aquarcommented, Mar 28, 2017

I am facing the exact issue with Node, Protractor and Chrome driver upgrades to the above mentioned versions. I am using Jasmine framework. Copying the parent browser properties to the new browser instances doesn’t fix the issue. Are there any more updates on the issue ?

3reactions
mtheoryxcommented, Mar 16, 2017

I’ve noticed this happening with jasmine as well, FWIW

Read more comments on GitHub >

github_iconTop Results From Across the Web

Potential fix for issue 4151: Forked driver ignores ... - GitHub
Potential fix for issue 4151: Forked driver ignores waitForAngularEnabled #4418. Open. slotik wants to merge 1 commit into angular:master. base: master.
Read more >
Forked driver instance never quits - Stack Overflow
The reason it is failing is exactly as I said, he is quitting the original browser not the forked one. Although he can...
Read more >
9 Understanding timeouts - Testing Angular Applications
When you enable waitForAngular, Protractor will cause all of your WebDriver commands to wait until there are no more tasks pending in the...
Read more >
Protractor - Quick Guide - Tutorialspoint
Protractor − As discussed earlier, it is a wrapper over WebDriver JS ... As the name suggests this function will fork another instance...
Read more >
protractor | Yarn - Package Manager
Webdriver E2E test wrapper for Angular. angular, test, testing, webdriver. readme. Protractor Build Status CircleCI Status Join the chat ...
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