[Webtest] posting forms with Spring

Lisa Crispin Lisa Crispin" <lisa.crispin@gmail.com
Wed, 6 Jun 2007 08:43:32 -0600


------=_Part_18400_26799799.1181141012614
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Marc,
We're on a really old version, I think it's 1393, I haven't had time to
upgrade.  I'll install the new version and see if it works, I've been
needing to upgrade anyway.
thanks
Lisa

On 6/6/07, Marc Guillemot <mguillemot@yahoo.fr> wrote:
>
>
> Hi Lisa,
>
> I understand a bit better... but still need some explainations.
>
> How is the step=2 parameter set? Is it done on the server side or with
> some
> script on the client side?
>
> In fact I'm quite surprised because if submitted parameters are not
> computed
> correctly, then you would surely not be the first to complain.
>
> Last question: which WebTest build (with which htmlunit version) do you
> use?
>
> Marc.
>
>
> Lisa Crispin-2 wrote:
> >
> > Hi Marc,
> > It works in a normal browser (IE6).  What I am told by the developer is
> > that
> > Spring saves the parameter from the get, for example, 'step=1'.  Then
> when
> > you click the submit button, it remembers the parameter, adds 1 to it,
> and
> > appends 'step=2' to the URL that results when you submit.  That takes
> you
> > to
> > the next page.  When the WebTest script clicks the button, the step
> number
> > isn't changed, so you stay on the same page.  As far as I understand,
> they
> > did this in order to use one Spring controller for several different
> pages
> > that make up a UI wizard.
> >
> > The developer added hidden fields that allow WebTest to work, but since
> a
> > lot of people do use Spring, I was hoping someone else was doing
> something
> > similar and maybe there is a way for WebTest to handle this without
> having
> > to use the hidden fields.
> > thanks
> > Lisa
> >
> > On 6/5/07, Marc Guillemot <mguillemot@yahoo.fr> wrote:
> >>
> >>
> >> Hi Lisa,
> >>
> >> I'm not sure to understand. You want to use WebTest here to do
> something
> >> that wouldn't be possible with a "normal" browser. Is this correct?
> >>
> >> Marc.
> >>
> >>
> >> Lisa Crispin-2 wrote:
> >> >
> >> > When using Spring for UI development, it uses the same controller for
> >> the
> >> > get and the post of a form (eg, SimpleFormController).  When the form
> >> is
> >> > posted, Spring reattaches the parameters from the get to the posted
> >> > request.  Is there any way to simulate this behavior in WebTest?  I.E
> .,
> >> > when
> >> > a submit button is clicked, specify additional parameters for the
> >> posted
> >> > request.
> >> > thanks
> >> > Lisa
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/posting-forms-with-Spring-tf3867639.html#a10965488
> >> Sent from the WebTest mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> WebTest mailing list
> >> WebTest@lists.canoo.com
> >> http://lists.canoo.com/mailman/listinfo/webtest
> >>
> >
> >
> >
> > --
> > Lisa Crispin
> > Co-author,
> > Testing Extreme Programming
> > http://lisa.crispin.home.att.net
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/posting-forms-with-Spring-tf3867639.html#a10986570
> Sent from the WebTest mailing list archive at Nabble.com.
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>



-- 
Lisa Crispin
Co-author,
Testing Extreme Programming
http://lisa.crispin.home.att.net

------=_Part_18400_26799799.1181141012614
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Marc,<br>We&#39;re on a really old version, I think it&#39;s 1393, I haven&#39;t had time to upgrade.&nbsp; I&#39;ll install the new version and see if it works, I&#39;ve been needing to upgrade anyway.<br>thanks<br>Lisa<br>
<br><div><span class="gmail_quote">On 6/6/07, <b class="gmail_sendername">Marc Guillemot</b> &lt;<a href="mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi Lisa,<br><br>I understand a bit better... but still need some explainations.<br><br>How is the step=2 parameter set? Is it done on the server side or with some<br>script on the client side?<br><br>In fact I&#39;m quite surprised because if submitted parameters are not computed
<br>correctly, then you would surely not be the first to complain.<br><br>Last question: which WebTest build (with which htmlunit version) do you use?<br><br>Marc.<br><br><br>Lisa Crispin-2 wrote:<br>&gt;<br>&gt; Hi Marc,
<br>&gt; It works in a normal browser (IE6).&nbsp;&nbsp;What I am told by the developer is<br>&gt; that<br>&gt; Spring saves the parameter from the get, for example, &#39;step=1&#39;.&nbsp;&nbsp;Then when<br>&gt; you click the submit button, it remembers the parameter, adds 1 to it, and
<br>&gt; appends &#39;step=2&#39; to the URL that results when you submit.&nbsp;&nbsp;That takes you<br>&gt; to<br>&gt; the next page.&nbsp;&nbsp;When the WebTest script clicks the button, the step number<br>&gt; isn&#39;t changed, so you stay on the same page.&nbsp;&nbsp;As far as I understand, they
<br>&gt; did this in order to use one Spring controller for several different pages<br>&gt; that make up a UI wizard.<br>&gt;<br>&gt; The developer added hidden fields that allow WebTest to work, but since a<br>&gt; lot of people do use Spring, I was hoping someone else was doing something
<br>&gt; similar and maybe there is a way for WebTest to handle this without having<br>&gt; to use the hidden fields.<br>&gt; thanks<br>&gt; Lisa<br>&gt;<br>&gt; On 6/5/07, Marc Guillemot &lt;<a href="mailto:mguillemot@yahoo.fr">
mguillemot@yahoo.fr</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Hi Lisa,<br>&gt;&gt;<br>&gt;&gt; I&#39;m not sure to understand. You want to use WebTest here to do something<br>&gt;&gt; that wouldn&#39;t be possible with a &quot;normal&quot; browser. Is this correct?
<br>&gt;&gt;<br>&gt;&gt; Marc.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Lisa Crispin-2 wrote:<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; When using Spring for UI development, it uses the same controller for<br>&gt;&gt; the<br>&gt;&gt; &gt; get and the post of a form (eg, SimpleFormController).&nbsp;&nbsp;When the form
<br>&gt;&gt; is<br>&gt;&gt; &gt; posted, Spring reattaches the parameters from the get to the posted<br>&gt;&gt; &gt; request.&nbsp;&nbsp;Is there any way to simulate this behavior in WebTest?&nbsp;&nbsp;I.E.,<br>&gt;&gt; &gt; when<br>&gt;&gt; &gt; a submit button is clicked, specify additional parameters for the
<br>&gt;&gt; posted<br>&gt;&gt; &gt; request.<br>&gt;&gt; &gt; thanks<br>&gt;&gt; &gt; Lisa<br>&gt;&gt; &gt;<br>&gt;&gt; &gt;<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; View this message in context:<br>&gt;&gt; <a href="http://www.nabble.com/posting-forms-with-Spring-tf3867639.html#a10965488">
http://www.nabble.com/posting-forms-with-Spring-tf3867639.html#a10965488</a><br>&gt;&gt; Sent from the WebTest mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>&gt;&gt;<br>&gt;&gt; _______________________________________________
<br>&gt;&gt; WebTest mailing list<br>&gt;&gt; <a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br>&gt;&gt; <a href="http://lists.canoo.com/mailman/listinfo/webtest">http://lists.canoo.com/mailman/listinfo/webtest
</a><br>&gt;&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Lisa Crispin<br>&gt; Co-author,<br>&gt; Testing Extreme Programming<br>&gt; <a href="http://lisa.crispin.home.att.net">http://lisa.crispin.home.att.net</a><br>&gt;
<br>&gt;<br><br>--<br>View this message in context: <a href="http://www.nabble.com/posting-forms-with-Spring-tf3867639.html#a10986570">http://www.nabble.com/posting-forms-with-Spring-tf3867639.html#a10986570</a><br>Sent from the WebTest mailing list archive at 
<a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com">WebTest@lists.canoo.com</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest">
http://lists.canoo.com/mailman/listinfo/webtest</a><br></blockquote></div><br><br clear="all"><br>-- <br>Lisa Crispin<br>Co-author, <br>Testing Extreme Programming<br><a href="http://lisa.crispin.home.att.net">http://lisa.crispin.home.att.net
</a>

------=_Part_18400_26799799.1181141012614--