[Webtest] setInputField: Why can I add more then maxlength characters

Robert Bodziony Robert Bodziony" <robert.bodziony@gmail.com
Wed, 9 Jan 2008 17:48:26 +0100


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

opened  :)

 http://webtest-community.canoo.com/jira/browse/WT-372<http://webtest-community.canoo.com/jira/browse/WT-372>

 Regards,
 Robert

2008/1/9, Marc Guillemot <mguillemot@yahoo.fr>:
>
> you're right.
>
> What would make sense probably would be to respect the maxlength per
> default and add an optional attribute to the step to specify that
> maxlength check should be bypassed.
>
> Can you open an issue for that? (with a patch, it's even better ;-))
>
> Cheers,
> Marc.
> --
> Blog: http://mguillem.wordpress.com
>
>
> Robert Bodziony wrote:
> > hi
> >  i got same issue. i think that SetInputField method doesne care ab
> > maxlength or size parameter :(
> >
> >   Regards,
> >
> >  Robert
> >
> >
> >
> > 2008/1/9, Willi Kuhnis < wkuehnis@gmail.com <mailto:wkuehnis@gmail.com
> >>:
> >
> >     Hi,
> >
> >
> >     I want to check the maxlength of a input-field.
> >
> >     I have a Input-field like this:
> >
> >     <input class="coolborder" name
> >     =
> >     "RemoteDir" type="text" size="40"
> >     maxlength="40" value="">
> >
> >
> >
> >     **** First I fill a variable with a string of the maxlength (40)
> >
> >     <var name="x" value=""/>
> >
> >     <repeat count="${maxlength}">
> >
> >         <var name="x" value="M${x}"/>
> >
> >     </repeat>
> >
> >     <echo>${x}</echo>
> >
> >     ************* Then I fill in this variable to the Input field
> >
> >     <setInputField value="${x}" name="${name}" description="Set
> >     editfield ${name} to a length of ${maxlength} : ${x}"/>
> >
> >     <clickButton label="Submit" description="Press the submit button for
> >     ${name}"/>
> >
> >
> >
> >     ******* Then I check the content -> this has to be OK
> >
> >     <verifyInputField value="${x}" name="${name}" description="check if
> >     the Inputfield has still the same content"/>
> >
> >
> >
> >     ***** Now I add one more character to my variable and enter this I
> >     the input field
> >
> >     <var name="x" value="${x}+"/>
> >
> >     <echo>${x}</echo>
> >
> >     <setInputField value="${x}" name="${name}" description="Set
> >     editfield ${name} to maxlength+1 ${x}"/>
> >
> >
> >
> >     ******* When I test the content of the Inputfield, then I get 41
> >     characters-> this should not be possible!!
> >
> >     <storeInputFieldAttribute name="${name}" property="valnew"
> >     attributeName="value" description="Get the value"/>
> >
> >     <echo>"my value 1="</echo>
> >
> >     <echo>"#{valnew}"</echo>
> >
> >
> >
> >
> >     ******* Also verifyInputField say, that the field contents all the
> >     41 characters -> this should be not possible
> >
> >     <verifyInputField value="${x}" name="${name}" description="check:the
> >     Inputfield must not have the same content"/>
> >
> >
> >
> >
> >
> >     What can I do ?
> >
> >     Thanks for a help
> >
> >     Willi
> >
> >
> >
> >     --
> >     Willi Kuhnis
> >     wkuehnis@gmail.com <mailto:wkuehnis@gmail.com>
> >     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
>
>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

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

opened&nbsp; :)<br>&nbsp;<br><a href="http://webtest-community.canoo.com/jira/browse/WT-372">&nbsp;http://webtest-community.canoo.com/jira/browse/WT-372</a><br><br>&nbsp;Regards,<br>&nbsp;Robert<br><br><div><span class="gmail_quote">2008/1/9, Marc Guillemot &lt;
<a href="mailto:mguillemot@yahoo.fr">mguillemot@yahoo.fr</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">you&#39;re right.<br>
<br>What would make sense probably would be to respect the maxlength per<br>default and add an optional attribute to the step to specify that<br>maxlength check should be bypassed.<br><br>Can you open an issue for that? (with a patch, it&#39;s even better ;-))
<br><br>Cheers,<br>Marc.<br>--<br>Blog: <a href="http://mguillem.wordpress.com">http://mguillem.wordpress.com</a><br><br><br>Robert Bodziony wrote:<br>&gt; hi<br>&gt;&nbsp;&nbsp;i got same issue. i think that SetInputField method doesne care ab
<br>&gt; maxlength or size parameter :(<br>&gt;<br>&gt;&nbsp;&nbsp; Regards,<br>&gt;<br>&gt;&nbsp;&nbsp;Robert<br>&gt;<br>&gt;<br>&gt;<br>&gt; 2008/1/9, Willi Kuhnis &lt; <a href="mailto:wkuehnis@gmail.com">wkuehnis@gmail.com</a> &lt;mailto:
<a href="mailto:wkuehnis@gmail.com">wkuehnis@gmail.com</a>&gt;&gt;:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Hi,<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I want to check the maxlength of a input-field.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I have a Input-field like this:<br>
&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input class=&quot;coolborder&quot; name<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; =<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &quot;RemoteDir&quot; type=&quot;text&quot; size=&quot;40&quot;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; maxlength=&quot;40&quot; value=&quot;&quot;&gt;<br>&gt;<br>
&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; **** First I fill a variable with a string of the maxlength (40)<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;var name=&quot;x&quot; value=&quot;&quot;/&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;repeat count=&quot;${maxlength}&quot;&gt;
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;var name=&quot;x&quot; value=&quot;M${x}&quot;/&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/repeat&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;echo&gt;${x}&lt;/echo&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ************* Then I fill in this variable to the Input field
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;setInputField value=&quot;${x}&quot; name=&quot;${name}&quot; description=&quot;Set<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; editfield ${name} to a length of ${maxlength} : ${x}&quot;/&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;clickButton label=&quot;Submit&quot; description=&quot;Press the submit button for
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ${name}&quot;/&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ******* Then I check the content -&gt; this has to be OK<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;verifyInputField value=&quot;${x}&quot; name=&quot;${name}&quot; description=&quot;check if
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; the Inputfield has still the same content&quot;/&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ***** Now I add one more character to my variable and enter this I<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; the input field<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;var name=&quot;x&quot; value=&quot;${x}+&quot;/&gt;
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;echo&gt;${x}&lt;/echo&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;setInputField value=&quot;${x}&quot; name=&quot;${name}&quot; description=&quot;Set<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; editfield ${name} to maxlength+1 ${x}&quot;/&gt;<br>
&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ******* When I test the content of the Inputfield, then I get 41<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; characters-&gt; this should not be possible!!<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;storeInputFieldAttribute name=&quot;${name}&quot; property=&quot;valnew&quot;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; attributeName=&quot;value&quot; description=&quot;Get the value&quot;/&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;echo&gt;&quot;my value 1=&quot;&lt;/echo&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;echo&gt;&quot;#{valnew}&quot;&lt;/echo&gt;
<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ******* Also verifyInputField say, that the field contents all the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 41 characters -&gt; this should be not possible<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;verifyInputField value=&quot;${x}&quot; name=&quot;${name}&quot; description=&quot;check:the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Inputfield must not have the same content&quot;/&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; What can I do ?<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for a help<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Willi<br>&gt;<br>&gt;<br>&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; --<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Willi Kuhnis<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:wkuehnis@gmail.com">wkuehnis@gmail.com</a> &lt;mailto:<a href="mailto:wkuehnis@gmail.com">wkuehnis@gmail.com</a>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<br>&gt;<br>&gt;<br><br><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>

------=_Part_2698_13519140.1199897306338--