【问题标题】:What is difference between waitForAngularEnabled and browser.ignoreSynchronization in protractor?量角器中的 waitForAngularEnabled 和 browser.ignoreSynchronization 有什么区别?
【发布时间】:2017-09-20 12:13:17
【问题描述】:

什么是 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 两者看起来都一样。有没有什么具体的事情可以由一个人完成而不是另一个?

【问题讨论】:

    标签: protractor


    【解决方案1】:

    它们完全相同,如果您查看 source code ignoreSynchronization 实际上调用 waitForAngularEnabled。唯一需要注意的是,ignoreSynchronization 已被弃用,最终将不再可用。他们正在切换到waitForAngularEnabled 作为主要属性。

    就他们的工作而言,answered here 非常详细。

    【讨论】:

      猜你喜欢
      • 2015-05-02
      • 1970-01-01
      • 2017-06-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-21
      • 1970-01-01
      • 2015-02-26
      相关资源
      最近更新 更多