Using $.ajaxStop() to determine when page is finished loading in CasperJS
问题 So far in my tests written in CasperJS, I've been using waitForSelector() on page-specific elements to determine if a page has fully loaded (including all the async ajax requests). I was hoping to come up with a more standard way of waiting for page load and was wondering if the following was possible? Inject as clientscript the following (include.js) $(document).ajaxStop(function() { // Do something }) Description of ajaxStop according to jquery api: Register a handler to be called when all