2017-09-20 43 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在良好的細節。

相關問題