I'm trying to get Selenium to wait for all of the AJAX requests on a page to complete before proceeding to the next command. I'm using wait_for_condition
and the following JavaScript:
function(){
var wait = function() { return jQuery.active == 0; }
return wait.call(selenium.browserbot.getCurrentWindow());
}();
This works fine in Firefox but fails with a timeout in IE.
Does anyone know why this might be or have an alternative approach for waiting for AJAX requests to finish?