Page 1 of 1

Wait for all AJAX requests to complete

Posted: Mon Mar 31, 2014 11:42 am
by MarilynMich
Firstly, I am aware that this issue has been address before:

wait-for-all-ajax-requests-to-complete-t3089 (New account, cannot add URLS apparently)

However, that was 2 yrs ago and a full version behind. I want to do exactly what the other tester wanted to do on that post in that to create a script that pauses execution until all Ajax requests has been completed. I know for certain after thorough testing that WaitForDocumentLoaded() does not work with Ajax. The support then suggested that the tester use jquery, how would I go about doing that? Secondly, support also said the developer stated that we could test for Ajax completed requests although it could not be done easily, what exactly did he mean? I don't mind complexity at all. And finally, support also said checking XmlHTTPRequest in some way, how would I do that? I love your product, but out of the big 3, (Telerik Test Studio, Smartbear Testcomplete, and Ranorex) Ranorex is the only one that has not implemented Ajax event processing from what I've seen, and this is a deal breaker if it cannot be done, anyways thanks in advance.

Re: Wait for all AJAX requests to complete

Posted: Mon Apr 07, 2014 11:20 am
by MarilynMich
45 views one week later and still no solutions??? Why am I the only one on the front page of the API forum without a response? Do I really have the developers stumped?

Re: Wait for all AJAX requests to complete

Posted: Mon Apr 07, 2014 4:36 pm
by Support Team
Hello Marilyn,

I’m really sorry for the late response. Unfortunately, there is no general approach for checking all AJAX requests to complete. You have to implement an indicator in order to recognize that the AJAX request finished. E.g. an UI-Element which gets loaded on the page or a Java script function which allows Ranorex to communicate somehow with the system under test.

Regards,
Robert