angularjs - Can I add another condition into the Angular.js synchronization -


protractor wait angular.js process finish before continuing execution flow. in every step (after every click() call, etc.).

i'm testing application has lot of "loaders" reason not caught synchronization , i'm getting lot of errors.

i can manually put wait after each instruction execute wait after each instruction.

is there way add condition protractor synchronization mechanism?

ok, bit hackerish, found way. protractor uses waitforangular() after each webdriver command. https://github.com/angular/protractor/blob/f034e010156a85cf1826b95eb7f41f50ef5a1791/lib/protractor.js#l319

you can alter function in example onprepare:

browser.waitforangular = function(opt_description) {         var description = opt_description ? ' - ' + opt_description : '';         var self = this;         waituntilloaderdissapears();         if (this.ignoresynchronization) {             return self.driver.controlflow().execute(function () {                 return true;             }, 'ignore synchronization protractor.waitforangular()');         }     }; 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -