Closed getafix closed 9 years ago
Is the page you testing in Angular ?. Use this if that's Non-angular page - browser.ignoreSynchronization = true;
This should be a known issue for protractor and the method @smahalingam mentioned works but it's definitely not the best solution. if we depress the synchronization for protractor, we also lose the benefit from protractor that it could wait $http services to finish and then run the test.
Hi Our's is Angular
I am running the coffee script (jasmine)tests in chrome driver Thanks
does your site use continuos polling with $timeout (see http://angular.github.io/protractor/#/timeouts) ? this makes the call waitForAngular() to think you page is not finished loading, so it waits indefinately and the script times out.
this was my issue. solved at http://stackoverflow.com/questions/26299173/protractors-waitforangular-fails-on-angular-webapp-appium-chrome-on-real-dev
Hi ,
We are using protractor to run coffee script tests at our workplace. I am getting this " Error while waiting for Protractor to sync with the page: {} " error. At the end of every test there is a re-direction happening which is what is puzzling. Is there any configuration settings that I need to add Error while waiting for Protractor to sync with the page: {} Any suggestions or pointers would help?
I am attaching part of the stack trace below
2) login shows the dashboard on successful login Message: Error: Error while waiting for Protractor to sync with the page: {} Stacktrace: Error: Error while waiting for Protractor to sync with the page: {} at Error ()
at C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1513:15
at C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1663:7
at C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\nodemodules\selenium-webdriver\lib\goog\base.js:1582:15
at webdriver.promise.ControlFlow.runInNewFrame (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1640:20)
at notify (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:444:12)
at notifyAll (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:422:7)
at resolve (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:400:7)
at reject as errback
at reject (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\nodemodules\selenium-webdriver\lib\webdriver\promise.js:1827:5)
at webdriver.promise.ControlFlow.abortFrame (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1599:9)
at null._onTimeout (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:430:14)
==== async task ====
WebDriver.executeScript()
at webdriver.WebDriver.schedule (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:302:15)
at webdriver.WebDriver.executeAsyncScript (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:538:15)
at Protractor.waitForAngular (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\lib\protractor.js:1082:22)
at getWebElements (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\lib\protractor.js:182:21)
at getWebElements (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\nodemodules\protractor\lib\protractor.js:690:33)
at ElementArrayFinder.applyAction (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\lib\protractor.js:428:30)
at self.(anonymous function) as isEnabled
at self.(anonymous function) as isEnabled
at null. (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\test\customer\integration\spec\login_spec.coffee:19:49)
at C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\nodemodules\jasminewd\index.js:94:14
at webdriver.promise.ControlFlow.runInNewFrame (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\nodemodules\selenium-webdriver\lib\webdriver\promise.js:1640:20)
at webdriver.promise.ControlFlow.runEventLoop (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1505:8)
==== async task ====
Asynchronous test function: it()
at null. (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\jasminewd\index.js:93:33)
at null. (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\async-callback.js:45:37)
at jasmine.Block.execute (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\nodemodules\minijasminenode\lib\jasmine-1.3.1.js:1174:17)
at jasmine.Queue.next (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2209:31)
at onComplete (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2205:18)
at jasmine.WaitsForBlock.execute (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2704:5)
at null._onTimeout (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:2718:12)
Error
at null. (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\test\customer\integration\spec\loginspec.coffee:15:12)
at jasmine.Env.describe (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:913:21)
at jasmine.Env.describe (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:898:15)
at describe (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\jasmine-1.3.1.js:658:27)
at Object. (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\test\customer\integration\spec\login_spec.coffee:14:3)
at Object. (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\test\customer\integration\spec\login_spec.coffee:23:4)
at Object.loadFile (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\coffee-script\lib\coffee-script\register.js:16:19)
at require (module.js:380:17)
at Object.exports.executeSpecs (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\minijasminenode\lib\index.js:130:7)
at C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\lib\frameworks\jasmine.js:49:12
at _fulfilled (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\q\q.js:797:54)
at self.promiseDispatch.done (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\q\q.js:826:30)
at Promise.promise.promiseDispatch (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\q\q.js:759:13)
at C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\q\q.js:525:49
at flush (C:\Users\GRMGIQ\Desktop\ConceptsStore\CustomerWeb\node_modules\protractor\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:419:13)