angularjs - Protractor- need to slow down promise resolves -


in testing angular app e2e, have promise resolves , element not show(to clear show outside of test when clicking manually).

i used code slow down promise resolves. slow down protractor test in else... not slow down promise resolves. suggestions?

origfn = browser.driver.controlflow().execute;  browser.driver.controlflow().execute = function() {   var args;   args = arguments;   origfn.call(browser.driver.controlflow(), function() {     return protractor.promise.delayed(100);   });      return origfn.apply(browser.driver.controlflow(), args); }; 

first of all, protractor waits $http calls resolved before executing next async promise. if issue in animation slowness, might want use next code block wait until element isdisplayed() or ispresent() or more complicated condition:

browser.wait(function() {   return element(by...).isdisplayed(); }, timeout); 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -