Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is difference between waitForAngularEnabled and browser.ignoreSynchronization in protractor?

Tags:

protractor

What is browser.ignoreSynchronization?

/**
   * If true, Protractor will not attempt to synchronize with the page before
   * performing actions. This can be harmful because Protractor will not wait
   * until $timeouts and $http calls have been processed, which can cause
   * tests to become flaky. This should be used only when necessary, such as
   * when a page continuously polls an API using $timeout.
   *
   * @type {boolean}
   */

& waitForAngularEnabled Both looks same. Is there any specific thing that can achieve by one and not by other?

like image 267
Munir Khakhi Avatar asked Sep 20 '17 12:09

Munir Khakhi


1 Answers

They are the exact same, if you look at the source code ignoreSynchronization actually calls waitForAngularEnabled. The only thing to note is, ignoreSynchronization is being deprecated and eventually will no longer be available. They are switching to waitForAngularEnabled as the main property.

As far as what they do, that has been answered here in good detail.

like image 171
Gunderson Avatar answered Dec 10 '22 23:12

Gunderson