量子器中waitForAngularEnabled和browser.ignoreSynchronization有什么区别?

Mun*_*khi 10 protractor

什么是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}
   */
Run Code Online (Sandbox Code Playgroud)

& waitForAngularEnabled 两者看起来都一样.是否有任何特定的东西可以由一个人而不是其他人实现?

Gun*_*son 8

它们完全相同,如果你看一下实际调用的源代码 .唯一需要注意的是,正在被弃用,最终将不再可用.他们正在转向作为主要财产. ignoreSynchronizationwaitForAngularEnabledignoreSynchronizationwaitForAngularEnabled

至于他们做了什么,这里已经详细回答了这个问题.