Forked driver instance ignores waitForAngularEnabled
See original GitHub issueBug 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:
- Created 7 years ago
- Reactions:12
- Comments:9
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 ?
I’ve noticed this happening with jasmine as well, FWIW