當年話下
2019-11-13 14:48:32
我見過很多次有人建議使用它:browser.ignoreSynchronization=true; // or false但是我不明白我們?yōu)槭裁葱枰?
2 回答

慕萊塢森
TA貢獻1810條經(jīng)驗 獲得超4個贊
此設置控制量角器是否應等待頁面上的角度。它沒有正確記錄,但是這里是代碼中的文檔字符串:
/**
* 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}
*/
換句話說,如果要針對非角度站點進行測試,請將ignoreSynchronization設置設置為true。作為一個真實的例子,請看我從角度頁面打開非角度頁面時遇到的挑戰(zhàn)之一:單擊之后打開非角度頁面。
添加回答
舉報
0/150
提交
取消