Viraf,

you can do it easily in your tests by yourself:

<groovy>
import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController
as NRAC
step.context.webClient.ajaxController = new NRAC();
</groovy>

Personally I have (or I've had) some tests with this code snippet but I
don't think that it should be done directly by WebTest.

Cheers,
Marc.
-- 
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com

Viraf Bankwalla wrote:
> Marc, thanks for your comments.  While I do agree that there a number of
> problems to solve, I do believe that allowing the user to specify their
> own ajax controller does add value to the product.  For example, I
> believe that there are class of use cases that could be supported with
> NicelyResynchronizedAjaxController without the need for timeouts or
> intervals.
> 
> Thanks for referring me to HtmlUnit 2.5 - I will check out the changes
> you refered to.
> 
> Thanks
> 
> - viraf
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------
> *From:* Marc Guillemot <[email protected]>
> *To:* [email protected]
> *Sent:* Tuesday, March 3, 2009 4:00:13 AM
> *Subject:* Re: [Webtest] Fw: Ajax support
> 
> Hi Viraf,
> 
> the NicelyResynchronizedAjaxController is only one part of the problem:
> it doesn't solve the synchronisation needs for setTimeout and
> setInterval. WebTest already has an (hidden) config setting for this:
> easyajax nevertheless it doesn't work perfectly in all cases. Progress
> has been made on this front in HtmlUnit and it will perhaps be possible
> that easyajax becomes on per default once HtmlUnit-2.5 is out.
> 
> Cheers,
> Marc.
> -- 
> Web: http://www.efficient-webtesting.com
> Blog: http://mguillem.wordpress.com
> 
> Viraf Bankwalla wrote:
>> Hi, I am new to WebTest and am glad to have stumbled across it.  I
>> started off with the need to put a load on an Ajax application and
>> stumbled across HTMLUnit.  Further searching led me to a blog posting in
>> which there was a reference to running WebTests in JMeter.  If anyone
>> has some details on this I would appreciate it.
>>
>> One of the problems that I had faced with Selenium and HTMLUnit
>> initially was that tests would fail due to Ajax calls.  The current
>> version of HTMLUnit allows one to specify an AjaxController.  I used the
>> NicelyResynchronizedAjaxController to get passt the issues that I was
>> facing.  I have modified my copy of WebTest (which uses HTMLUnit) to
>> specify the NicelyResynchronizedAjaxController when it creates the
>> WebClient and things appear to be working for me.
>>
>> I would like to propose an enhancement WebTest to allow one to specify
>> the AjaxController to use as an option.  The name of the option could be
>> 'ajaxcontroller' and the value could be the fully qualified name of a
>> class on the classpath.
>>
>> Let me know your thoughts.  I would be glad to make the change and commit.
>>
>> Viraf
>>
>>
> 
> _______________________________________________
> WebTest mailing list
> [email protected] <mailto:[email protected]>
> http://lists.canoo.com/mailman/listinfo/webtest
> 

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to