Marc, Sorry to be taking so long to respond. I've been preparing a comparison of web testing tools for my company. Until this can be resolved, I have recommended to our company that they do not use WebTest. This was a great disappointment for me, as I had high hopes for WebTest. I have been unable to find a way to get by this hurdle.
What I meant about WebTest going into a loop was explained in this post: http://lists.canoo.com/pipermail/webtest/2008q3/010852.html As you can see in the below snipped of the log, it keeps retrying the page when it is updated by AJAX. It will continue this looping for the duration of the sleep or the easyAjax config parameter timeout. This is run against Petstore 2.0 from Sun's Blueprints website, running on Glassfish. Here is the WebTest code. <project default="test"> <target name="test"> <webtest name="check that petstore categories can be found by clicking images"> <config port="51492" basepath="petstore" easyajax="true"/> <steps> <invoke url="/faces/index.jsp" description="Go to Petstore 2.0"/> <verifyTitle text="Java Pet Store Reference Application" /> <verifyXPath xpath="//[EMAIL PROTECTED]"browse('Dogs')"]" /> <clickElement xpath="//[EMAIL PROTECTED]"browse('Dogs')"]" /> <sleep seconds="10"/> <verifyText text="Java Pet Store" /> <verifyText text="Beach Dog"/> <clickElement xpath="//[EMAIL PROTECTED]'/petstore/images/banner_logo.gif']" description="Main Page" /> </steps> </webtest> </target> </project> Both options cause webtest to go into a loop with the statement that the contents of the window have changed. See snippet below. This repeats over and over until cancelled or the timeout expires. [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Content of window changed to http://localhost:4867/petstore/faces/catalog .jsp?catid=Dogs#canine01,101 (text/html) [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Content of current window changed, it will become current response [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Current form set to none [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Current response now: http://localhost:4867/petstore/faces/catalog.jsp?ca tid=Dogs#canine01,101 [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Content of window changed to http://localhost:4867/petstore/faces/catalog .jsp?catid=Dogs#canine01,101 (text/html) [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Content of current window changed, it will become current response [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Current form set to none [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Current response now: http://localhost:4867/petstore/faces/catalog.jsp?ca tid=Dogs#canine01,101 [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Content of window changed to http://localhost:4867/petstore/faces/catalog .jsp?catid=Dogs#canine01,101 (text/html) [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Content of current window changed, it will become current response [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Current form set to none [clickElement] INFO (com.canoo.webtest.engine.WebClientContext) - Current response now: http://localhost:4867/petstore/faces/catalog.jsp?ca tid=Dogs#canine01,101 Cheers, Paul Beck Message: 3 Date: Tue, 15 Jul 2008 09:23:21 +0200 From: Marc Guillemot <[EMAIL PROTECTED]> To: [email protected] Subject: Re: [Webtest] Re: richFaces Ajax + content not updated (Keusch Florian) Reply-To: [email protected] Reply-To: Marc Guillemot <[EMAIL PROTECTED]> 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. _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

