You can test AJAX-based applications in two different ways; by setting the Auto Trace option to true or by setting the Auto Trace option to false.
| Method | Description | Example |
|---|---|---|
| SetAjaxTrace(boolean) | To trace the AJAX requests on the Document control | document_htmlDocument().setAjaxTrace(true); |
| GetAjaxPendingRequests () | Returns the number of AJAX pending requests at any given point of time since the first AjaxTraceOn. | document_htmlDocument().getAjaxPendingRequests(); |
| WaitForAjaxPendingRequests (int) | To wait for the specified number of AJAX requests to be completed. Waits indefinitely till pending requests becomes zero, if the argument is not specified. | document_htmlDocument().waitForAjaxPendingRequests(2); |
| GetAjaxCompletedRequests () | Returns the number of AJAX requests completed at any given point of time since the first AjaxTraceOn.. | document_htmlDocument().getAjaxCompletedRequests(); |
| WaitForAjaxCompletedRequests (int) | To wait for the specified number of Ajax requests to be completed. | document_htmlDocument().waitForAjaxCompletedRequests(4); |