[Webtest] Re: richFaces Ajax + content not updated

Marc Guillemot Marc Guillemot <mguillemot@yahoo.fr>
Wed, 09 Jul 2008 16:04:35 +0200


I guess that it doesn't work with HtmlUnit-2.1 but it should work in a
near future, once HtmlUnit-2.2 is integrated in WebTest. Inded the
JSFUnit guys had the same issue with
and I've fixed for a few weeks.

Blog: http://mguillem.wordpress.com

Keusch Florian wrote:
> Hi Stefan,
> thanks for your reply. I changed the test to use verifyXpath instead:
> <webtest name="richFaces demo - test ajax commandButton">
> 	<invoke
> url="http://livedemo.exadel.com/richfaces-demo/richfaces/commandButton.j
> sf c=commandButton"/>
> 	<setInputField name="j_id221:j_id224" value="florian"/>
> 	<clickButton label="Say Hello" name="j_id221:j_id225"/>
> 	<verifyxpath xpath="id('out')/span[@class='outhello'][2]"/>
> </webtest>
> But this does not solve the problem.
> The problem is that the content is not updated. After the clickButton
> step in the results I also don't have
> A new content displayed. This test is only a small example. In our
> application I use ajax buttons to manipulate much more page content (see
> other post).
> I've checked with a http proxy. The dat in xml form correct is sent from
> the server, but somehow on the client side (webtest) the DOM is not
> updated.
> Stefan
>> Dear Florian,
>> see http://webtest.canoo.com/webtest/manual/verifyText.html:
> <http://webtest.canoo.com/webtest/manual/verifyText.html:> 
>> "This step verifies the existence of the specified string somewhere in
> the 
>> response received from server (ie the changes that may have occured
> since 
>> the page has been loaded are not seen by this step)."
>> You'll need to use e.g. verifyXpath to investigate changed content.
>> Best regards,
>> Stefan
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest