2017-09-20 6 views
3

browser.ignoreSynchronizationとは何ですか?分度器のwaitForAngularEnabledと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 はどちらも同じに見えます。他の人ではなく一つで達成できる具体的なことはありますか?

答えて

3

これらはまったく同じです。source codeignoreSynchronizationをご覧になる場合は、実際にはwaitForAngularEnabledが必要です。注意すべき唯一のことは、ignoreSynchronizationは推奨されなくなり、最終的には利用できなくなることです。彼らはメインプロパティとしてwaitForAngularEnabledに切り替わります。

彼らが何をするかについては、answered hereが詳細に説明されています。

関連する問題