-->

What is difference between waitForAngularEnabled a

2020-08-13 07:20发布

问题:

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?

回答1:

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.



标签: protractor