Page 1 of 1

Wait for all AJAX requests to complete

Posted: Thu Feb 16, 2012 9:34 am
by AKalytiuk
Hi,

Please tell is there any tools in Ranorex API to wait for all AJAX requests on the web page to complete? Does method .WaitForDocumentLoaded() (http://www.ranorex.com/Documentation/Ra ... aded_1.htm) wait till all AJAX requests on the page are completed?

I perform testing of web page which has some controls updated with AJAX requst after click on other controls. I need to perform validation of controls that are dynamically changed with AJAX and for that I need to know when AJAX request is completed.

Please advice which approach is better to wait till updating of page's controls with AJAX is completed in order to start validation only after controls are completely loaded? In first place it is interesting to me wheter any way is available to identify that all AJAX requests on web page are completed - to be sure that all controls are fully updated.

Now to identify moment when it is ok to start validation I use wait till certain properties of AJAX-updated-controls are changed.

Could you please also recommend any approach to identify that Java applet on Web page has completed performing its activities and closed all connection to remote servers at certain moment.

Thanks.

Regards.
Andrii Kalytiiuk

Re: Wait for all AJAX requests to complete

Posted: Thu Feb 16, 2012 1:51 pm
by Support Team
Hi,

I talked to the related developer and he said to me that there is no chance to check this in an easy way.
If you use jQuery you could take a look to following documentation
http://api.jquery.com/ajaxComplete/
if not you have to check the XMLHttpRequest in some way.

Regards,
Peter
Ranorex Team

Re: Wait for all AJAX requests to complete

Posted: Tue Jun 10, 2014 1:24 pm
by steve20
Hey there,

i have a question concerning the AJAX-topic:
We are developing a dynamic web application also using ajax-requests.
Has there been any change since 2012 in this field or could sb recommend documentations, books, etc. where i can read about it?

Thanks.

Regards,
steve20

Re: Wait for all AJAX requests to complete

Posted: Mon Jun 16, 2014 2:42 pm
by Support Team
Hi Steve,

There has nothing changed regarding the handling of Ajax-requests, but may I ask you with what exactly you have troubles with?
There is maybe an easy way to handle it with Ranorex.

Regards,
Markus