From: David D. K. <ddk...@ki...> - 2005-07-02 16:15:24
|
Use a timer thread to make sure the test times out while it's waiting for a particular result. You can never be sure when the result is returned unless some extra functionality is added to the XMLHttpRequest implementation in HtmlUnit to make it easier to test. Dave On Jul 1, 2005, at 11:08 PM, Kent Tong wrote: > Hi, > > As AJAX (XMLHttpRequest) is asynchronous, how can I test it using > HtmlUnit? > That is, how to ensure that the result has been returned? > > Thanks! |