[Webtest] Form fields not found

Harman Birdi Harman Birdi" <harman.birdi@gmail.com
Tue, 9 Sep 2008 12:36:29 -0700


------=_Part_107582_23951187.1220988989920
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Marc,

The form is generated dynamically. As a matter of face most of the pages in
the
application are generated that way. As for the "double-posted", what I meant
was that the Firebug plugin in Firefox says, it needs to double post.

I can't seem to find where I saw it in the plugin. Will have to try it
again? But
the problem is that the WTR records it, but when I try to put the steps in a
file and replay it, its not found.

Also, is there anyway that I can have the WTR recordings show htmlid
recording
by default (if available), rather than highlighting it and then looking for
the
alternative. Even this was working for me where the recordings would have
multiple lines to do the same thing and you could just delete the ones that
were not required, but now I dont seem to get that. I have to highlight and
look
for alternative with htmlid.

Thanks,
--Harman

On Tue, Sep 9, 2008 at 4:00 AM, Marc Guillemot <mguillemot@yahoo.fr> wrote:

> Hi,
>
> how is the form created? Just made visible or is it the result of some
> serve call? Do you see the form in the result page available after
> you've clicked the button?
>
> Sorry, but I don't understand what you mean with "double-posted" in
> Firefox.
>
> Cheers,
> Marc.
> --
> Blog: http://mguillem.wordpress.com
>
> av8r wrote:
> > Hi,
> >
> > I am trying to automate the testing of our application using webtest, but
> it
> > fails for
> > something we call subpanels in our application. I am able to click on the
> > button "Create"
> > to bring up the form, which in the real application will show the form
> which
> > contains
> > few html form fields. I am using htmlunit-2.2 and still experiencing the
> > problem. Read
> > in some other threads that this should be resolved in htmlunit-2.2
> >
> > Canoo webtest recorder is able to pick up the form field but when I use
> it
> > in my script,
> > it is not able to find it. I believe the form itself is generated by some
> > javascript coding or
> > something.
> >
> > The basic test is as below:
> >
> > <project default="test">
> >    <target name="test">
> >        <webtest name="Test 1 - Create, Search, Delete Contact">
> >             <steps>
> >                 <echo message="Execute login and step"/>
> >                 &loginAndStep;
> >                 <clickLink label="Accounts"/>
> >                 <clickLink label="Create Account"/>
> >                 <setInputField htmlId="name" value="Test Account"/>
> >                 <clickButton label="Save" name="button"/>
> >                 <selectForm name="form" id="formformContacts"/>
> >                 <clickButton name="accounts_contacts_create_button"/>
> >                 <selectForm name="form" id="QuickCreate"/>
> >                 <clickButton name="Contacts_subpanel_full_form_button"/>
> >                 <setInputField htmlId="first_name" value="Joe"/>    <===
> > This is where it fails
> >                 <setInputField name="last_name" value="Hartman"/>
> >                 <clickButton label="Save"/>
> >
> > I have added couple of screenshots of how it looks before and after the
> > "account_contacts_create_button" is clicked which opens up the form. I
> tried
> > this on Firebug
> > with Mozilla. Originally, it fails to show the html fields in the form,
> > complains that the form needs to
> > be double-posted. Once I click on the Load button for that, it does show
> > these html form fields.
> >
> > My question is: How can I force webtest to run post when I want it to,
> > rather than after clicking on
> > some button? Also, if this is not the issue what could be causing it?
> >
> > I would really appreciate if someone can help me resolve this. Its the
> > gating factor in my automation
> > efforts here, and I am pulling my hair out over this. Please help.
> > http://www.nabble.com/file/p19284212/before.JPG before.JPG
> > http://www.nabble.com/file/p19284212/after.JPG after.JPG
>
>  _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

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

<div dir="ltr"><div>&nbsp;</div>
<div>Marc,</div>
<div>&nbsp;</div>
<div>The form is generated dynamically. As a matter of face most of the pages in the<br>application are generated that way. As for the &quot;double-posted&quot;, what I meant<br>was that the Firebug plugin in Firefox says, it needs to double post.</div>

<div>&nbsp;</div>
<div>I can&#39;t seem to find where I saw it in the plugin. Will have to try it again? But<br>the problem is that the WTR records it, but when I try to put the steps in a</div>
<div>file and replay it, its not found.</div>
<div>&nbsp;</div>
<div>Also, is there anyway that I can have the WTR recordings show htmlid recording<br>by default (if available), rather than highlighting it and then looking for the<br>alternative. Even this was working for me where the recordings would have<br>
multiple lines to do the same thing and you could just delete the ones that<br>were not required, but now I dont seem to get that. I have to highlight and look<br>for alternative with htmlid.</div>
<div>&nbsp;</div>
<div>Thanks,</div>
<div>--Harman<br><br></div>
<div class="gmail_quote">On Tue, Sep 9, 2008 at 4:00 AM, Marc Guillemot <span dir="ltr">&lt;<a href="mailto:mguillemot@yahoo.fr" target="_blank">mguillemot@yahoo.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>how is the form created? Just made visible or is it the result of some<br>serve call? Do you see the form in the result page available after<br>
you&#39;ve clicked the button?<br><br>Sorry, but I don&#39;t understand what you mean with &quot;double-posted&quot; in Firefox.<br><br>Cheers,<br>Marc.<br><font color="#888888">--<br>Blog: <a href="http://mguillem.wordpress.com/" target="_blank">http://mguillem.wordpress.com</a><br>
</font>
<div>
<div></div>
<div><br>av8r wrote:<br>&gt; Hi,<br>&gt;<br>&gt; I am trying to automate the testing of our application using webtest, but it<br>&gt; fails for<br>&gt; something we call subpanels in our application. I am able to click on the<br>
&gt; button &quot;Create&quot;<br>&gt; to bring up the form, which in the real application will show the form which<br>&gt; contains<br>&gt; few html form fields. I am using htmlunit-2.2 and still experiencing the<br>&gt; problem. Read<br>
&gt; in some other threads that this should be resolved in htmlunit-2.2<br>&gt;<br>&gt; Canoo webtest recorder is able to pick up the form field but when I use it<br>&gt; in my script,<br>&gt; it is not able to find it. I believe the form itself is generated by some<br>
&gt; javascript coding or<br>&gt; something.<br>&gt;<br>&gt; The basic test is as below:<br>&gt;<br>&gt; &lt;project default=&quot;test&quot;&gt;<br>&gt; &nbsp; &nbsp;&lt;target name=&quot;test&quot;&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;webtest name=&quot;Test 1 - Create, Search, Delete Contact&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;steps&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;echo message=&quot;Execute login and step&quot;/&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;loginAndStep;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;clickLink label=&quot;Accounts&quot;/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;clickLink label=&quot;Create Account&quot;/&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;setInputField htmlId=&quot;name&quot; value=&quot;Test Account&quot;/&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;clickButton label=&quot;Save&quot; name=&quot;button&quot;/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;selectForm name=&quot;form&quot; id=&quot;formformContacts&quot;/&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;clickButton name=&quot;accounts_contacts_create_button&quot;/&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;selectForm name=&quot;form&quot; id=&quot;QuickCreate&quot;/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;clickButton name=&quot;Contacts_subpanel_full_form_button&quot;/&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;setInputField htmlId=&quot;first_name&quot; value=&quot;Joe&quot;/&gt; &nbsp; &nbsp;&lt;===<br>&gt; This is where it fails<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;setInputField name=&quot;last_name&quot; value=&quot;Hartman&quot;/&gt;<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;clickButton label=&quot;Save&quot;/&gt;<br>&gt;<br>&gt; I have added couple of screenshots of how it looks before and after the<br>
&gt; &quot;account_contacts_create_button&quot; is clicked which opens up the form. I tried<br>&gt; this on Firebug<br>&gt; with Mozilla. Originally, it fails to show the html fields in the form,<br>&gt; complains that the form needs to<br>
&gt; be double-posted. Once I click on the Load button for that, it does show<br>&gt; these html form fields.<br>&gt;<br>&gt; My question is: How can I force webtest to run post when I want it to,<br>&gt; rather than after clicking on<br>
&gt; some button? Also, if this is not the issue what could be causing it?<br>&gt;<br>&gt; I would really appreciate if someone can help me resolve this. Its the<br>&gt; gating factor in my automation<br>&gt; efforts here, and I am pulling my hair out over this. Please help.<br>
&gt; <a href="http://www.nabble.com/file/p19284212/before.JPG" target="_blank">http://www.nabble.com/file/p19284212/before.JPG</a> before.JPG<br>&gt; <a href="http://www.nabble.com/file/p19284212/after.JPG" target="_blank">http://www.nabble.com/file/p19284212/after.JPG</a> after.JPG<br>
<br></div></div>
<div>
<div></div>
<div>_______________________________________________<br>WebTest mailing list<br><a href="mailto:WebTest@lists.canoo.com" target="_blank">WebTest@lists.canoo.com</a><br><a href="http://lists.canoo.com/mailman/listinfo/webtest" target="_blank">http://lists.canoo.com/mailman/listinfo/webtest</a><br>
</div></div></blockquote></div><br></div>

------=_Part_107582_23951187.1220988989920--