[Celerity-development] [Fwd: Re: [Htmlunit-user] Yet another AJAX question]
T. Alexander Lystad
alexander.lystad at finntech.no
Thu May 29 08:36:09 EDT 2008
2008/5/29 T. Alexander Lystad <alexander.lystad at finntech.no>:
> (If this has been asked and answered, I'd be happy to get a link.)
>
> I have a basic HTML form. When you click the submit button the submit
> button gets disabled, and some AJAX calls in the background. When the
> AJAX calls are finished, the button is enabled again.
>
> I'm using HTMLUnit to submit the form, but when I try to submit the
> form the second time, the submit button is disabled because HtmlUnit
> waited for the AJAX calls to finish.
>
> In HtmlUnit, how can I wait until the submit button is enabled?
-------- Original Message --------
> Subject: Re: [Htmlunit-user] Yet another AJAX question
> Date: Thu, 29 May 2008 12:59:15 +0200
> From: Jean-Baptiste Nizet <jnizet at gmail.com>
> To: htmlunit-user at lists.sourceforge.net
>
> Use webClient.setAjaxController(new
> NicelyResynchronizingAjaxController());
>
> JB.
I tried JB's suggestion in Ruby/Celerity and Java/HtmlUnit. It didn't
solve my problem, but it may come in handy later.
This however, worked:
sleep(0.1) until @browser.button(:value, "Send invitasjon").exists
The question is, should we regard this a workaround or not? Would it be
best if HtmlUnit "always waited for everything to finish", so that
Celerity users didn't have to bother with stuff like this?
--
T. Alexander Lystad
http://celerity.rubyforge.org/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Attached Message Part
URL: <http://rubyforge.org/pipermail/celerity-development/attachments/20080529/4fbeb25d/attachment.pl>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Attached Message Part
URL: <http://rubyforge.org/pipermail/celerity-development/attachments/20080529/4fbeb25d/attachment-0001.pl>
More information about the Celerity-development
mailing list