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

时间:2017-09-20 12:13:17

标签: 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}
   */

&安培; waitForAngularEnabled 两者看起来都一样是否有任何具体的事情可以由一个人而不是其他人实现?

1 个答案:

答案 0 :(得分:6)

如果您查看https://docs.python.org/3/library/functions.html?highlight=open#open ignoreSynchronization实际调用waitForAngularEnabled,则它们完全相同。唯一需要注意的是,ignoreSynchronization已被弃用,最终将不再可用。他们正在转换为waitForAngularEnabled作为主要财产。

就他们所做的事情而言,source code已经非常详细。