Selenium Ajax Synchronization
This method below applies to Selenium .Net
When you test web applications, sometimes you need to wait an active AJAX process is completed. You can achieve a WaitForAjax method with few lines of code as listed below.
In this method, when you call the WaitForAjax method, you can define maximum timeout time for the AJAX to be completed. For example, if the active AJAX should be completed within 40 seconds, you can call the method : WaitForAjax(40);
This method below tells you how much actual time the AJAX synchronization took by looking at the message on the console.