[Webtest] Problem with ajax content update

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Tue, 15 Jul 2008 09:32:46 +0200

Steve Chikwaya wrote:
> Hi everyone,
> Our intranet homepage has ajax content that loads independent of other
> elements on the page.  The initial display is that of a string
> "Loading.." after which the ajax content is retrieved and displayed. 
> Since there is no page refresh, webtest captures the "Loading..." string
> and sticks with that until a link is clicked, essentially voiding any
> type of text or link verification associated with the ajax content.  Is
> there anyway that I can perform the tests after the whole page,
> including the ajax content, has loaded without having to navigate around
> the page for fresh page hits?
> Thanks,
> -STeve Chikwaya.

there is currently no "perfect" solution for that. If your js libs don't
make intensive use of setInterval, <config easyajax="true"/> should be
perfect, otherwise a sleep (or a call to HtmlUnit's API) at the
problematic places should do the work.

Blog: http://mguillem.wordpress.com