[Webtest] Re: richFaces Ajax + content not updated (Keusch Florian)

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


XPath is very powerfull and verifyXPath allows to verify nearly
everything in your page.

You can surely add a sleep and it is possible to write a waitForElement
 la Selenium but I think that it should not be necessary (ok, it's not
yet fully the case).

I don't understand what you mean with "WebTest will go into a loop".

Cheers,
Marc.

Paul Beck wrote:
> Florian,
> 
> It appears this is the same issue I was seeing attempting to use
> WebTest against the Petstore 2.0 application. The suggested solution
> to use <verifyXPath> does not seem viable, as what I want to do is to
> verify the content displayed, not the existence/validity of a link or
> object on the page. Perhaps I don't understand how <verifyXPath>
> works. At any rate, since Watir and Selenium handle this situation
> quite nicely by inserting a pause/sleep to wait for the content to be
> rendered, I don't understand why WebTest cannot work the same. As I
> noted in a prior post, if you attempt to cause WebTest to wait for the
> completed response by inserting a <sleep> or by setting the <config>
> option "easyAjax", WebTest will go into a loop.
> 
> Paul Beck
> 
>> Date: Wed, 9 Jul 2008 12:55:44 +0200
>> From: "Keusch Florian" <florian.keusch@elca.ch>
>> To: <webtest@lists.canoo.com>
>> Subject: [Webtest] Re: richFaces Ajax + content not updated
>> Reply-To: webtest@lists.canoo.com
>> Reply-To: "Keusch Florian" <florian.keusch@elca.ch>
>>
>> hi,
>>
>> i've a simple test applied on the richFaces demo to show this problem:
>>
>> <webtest name=3D"richFaces demo - test ajax commandButton">
>>   <invoke
>> url=3D"http://livedemo.exadel.com/richfaces-demo/richfaces/commandButton.=
>> jsf?c=3DcommandButton"/>
>>   <setInputField name=3D"j_id221:j_id224" value=3D"florian"/>
>>   <clickButton label=3D"Say Hello" name=3D"j_id221:j_id225"/>
>>   <verifyText description=3D"Verify that text is contained in the page"
>> text=3D"Hello florian! "/>
>> </webtest>
>>
>> You'll see that the step verifyText fails because the page content was
>> not updated! I used a http proxy=20
>>
>> Using webtest r_1710 (with htmlunit 2.1)
>>
>>
>>
>> Greetings Florian
>>
>> --__--__--
>>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>