runWaitForAngularScript returns true when testing an Agular2 app
I'm having a similar issue to angular#7821 when testing an app build with Angular 2.0.0-rc.3, using either Protractor 3.3.0 or 4.0.0.
TypeError: Cannot assign to read only property 'stack' of Error while waiting for Protractor to sync with the page: true
at node_modules/protractor/built/element.js:377:21
at Promise.invokeCallback_ (node_modules/selenium-webdriver/lib/promise.js:1329:14)
at TaskQueue.execute_ (node_modules/selenium-webdriver/lib/promise.js:2790:14)
at TaskQueue.executeNext_ (node_modules/selenium-webdriver/lib/promise.js:2773:21)
at node_modules/selenium-webdriver/lib/promise.js:2652:27
at node_modules/selenium-webdriver/lib/promise.js:639:7
at process._tickCallback (internal/process/next_tick.js:103:7)
There seem to be two issues:
ElementArrayFinder.applyAction_can't properly join a stack string and and actual stack (similar to #3224), but I assume that was simply never meant to occur.runWaitForAngularScriptreturnstrueinstead of nada for some reason (I've specifiedrootElementin my config file, so it goes the classicwaitForAngularroute).
Any help would be greatly appreciated.
Currently protractor is swallowing the error. Could you wait for https://github.com/angular/protractor/pull/3372 and then try again?
The message got much more informative after I applied the patch manually :wink: It remained the same after updating to 4.0.2 as well.
Error
at ElementArrayFinder.applyAction_ (node_modules/protractor/built/element.js:395:27)
at ElementArrayFinder._this.(anonymous function) [as click] (node_modules/protractor/built/element.js:97:30)
at ElementFinder._this.(anonymous function) [as click] (node_modules/protractor/built/element.js:728:22)
at NodeListPage.clickNodeByName (steps/pages/foc/NodeListPage.js:18:41)
at [object Object].<anonymous> (steps/focSteps.js:14:39)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Any news on this? It's sort of a blocker for me, actually.
This has been addressed in 4.0.3 - closing this issue.
Please try this again.
I don't see how it could possibly have been fixed between 4.0.2 and 4.0.3, and I assure you it still persists on 4.0.3, unfortunately :disappointed: