量角器中的 waitForAngularEnabled 和 browser.ignoreSynchronization 有什么区别? [英] What is difference between waitForAngularEnabled and browser.ignoreSynchronization in protractor?

查看:43
本文介绍了量角器中的 waitForAngularEnabled 和 browser.ignoreSynchronization 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是 browser.ignoreSynchronization?

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两者看起来一样.有没有什么具体的事情可以通过一个人而不是其他人来实现?

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

推荐答案

它们是完全一样的,如果你看一下 源代码 ignoreSynchronization 实际上调用了 waitForAngularEnabled.唯一需要注意的是,ignoreSynchronization 已被弃用,最终将不再可用.他们正在切换到 waitForAngularEnabled 作为主要属性.

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.

这篇关于量角器中的 waitForAngularEnabled 和 browser.ignoreSynchronization 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆