[Webtest] How to send the different values in circular method

Zhou Xue webtest@lists.canoo.com
Fri, 14 May 2004 10:05:17 +0800


This is a multi-part message in MIME format.

------_=_NextPart_001_01C43957.E75CAD08
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

		Hi,
		There is a problem need your help:
		When I do test with <Setinputfield>,I need to input many values in =
some text fields,For these text fields in different lines,but there is a =
same name for these fields in html.
		I need to give multi different values to these same name textfileds in =
circular method.
		But, i can't get expect result.
		We got :

		BUILD FAILED
		file:E:/canoo/Porcode.properties:3: Content is not allowed in prolog.

		Could you help me to solve the problem ?
thanks.

> 	Bellow is source of html, please as reference=20
>=20
> 	for(int i =3D 0; i < tmpPocCd.length; ++i) { %>
> 	 <tr CLASS=3D"HL">
> 	 <td  > <input type=3D"checkbox" name=3D"selected" value=3D"<%=3D i =
%>"></td>
> 	 <td><%=3D i+1 %> </td>
> 	 <td>
> 	=20
> 	<input type=3D"text" name=3D"pocCd" size=3D"5" maxlength=3D"5" =
Value=3D"<%=3D tmpPocCd[i]=3D=3Dnull ?  : tmpPocCd[i] %>">
> 	 </td>
> =09
		Bellow is test script, please as reference.

		      <antcall target=3D"Porcode"/>
		       <param name=3D"pocCD.value" value=3D"${pocCD.value}" />
		 =20
		      </antcall>
			 <repeat count=3D"3" countername=3D"row">
				  =20
				   <setinputfield=20
					stepid=3D"set Port Code in Select Update Sailing Schedule Detail =
page"
					name=3D"pocCd"=20
					value=3D"${pocCD.value}"/>
				</repeat>=20
		   =20
		 <target name=3D"Porcode" depends=3D"mayPrintANTError">
		         =20
		           <ant antfile=3D"${webtest.home}/canoo/Porcode.properties"/>
		          =20
		      </target> =20
		=09
		    Bellow is my Porcode.properties:
		      pocCD.value.0=3DA
		       pocCD.value.1=3DB
		      pocCD.value.2=3DC

		=20
		  =20
> 	 Thanks a lot.
>=20
>=20

------_=_NextPart_001_01C43957.E75CAD08
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6556.0">
<TITLE>How to send the different values in circular method</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<UL><UL>
<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" =
FACE=3D"Times New Roman">Hi,</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">T</FONT><FONT COLOR=3D"#000080" FACE=3D"Times New =
Roman">here is a</FONT><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial"> =
problem</FONT> <FONT COLOR=3D"#000080" FACE=3D"Times New Roman">need =
your help:</FONT></SPAN></P>

<P><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">When=A0I do test</FONT> <FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">with</FONT> <FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">&lt;Setinputfield&gt;,I need to input many values =
in</FONT><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial"> some text =
fields</FONT><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial">,For these =
text fields in different lines,</FONT><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">but</FONT> <FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">there</FONT> <FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">is a</FONT><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial"> same name</FONT><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial"> for these fields in html</FONT><FONT COLOR=3D"#000080" =
SIZE=3D2 FACE=3D"Arial">.</FONT></SPAN></P>

<P><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">I need to give multi</FONT> <FONT COLOR=3D"#000080" =
SIZE=3D2 FACE=3D"Arial">different</FONT> <FONT COLOR=3D"#000080" =
SIZE=3D2 FACE=3D"Arial">value</FONT><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">s</FONT><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial"></FONT> <FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">to</FONT><FONT COLOR=3D"#000080" SIZE=3D2 FACE=3D"Arial"> =
these same name textfileds in circular method.</FONT></SPAN>

<BR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">But, i can't get expect result.</FONT></SPAN>

<BR><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">We got :</FONT></SPAN>
</P>

<P><SPAN LANG=3D"en-us"><FONT COLOR=3D"#000080" SIZE=3D2 =
FACE=3D"Arial">BUILD FAILED</FONT></SPAN>

<BR><SPAN LANG=3D"en-us"></SPAN><A =
HREF=3D"file:E:/canoo/Porcode.properties:3"><SPAN =
LANG=3D"en-us"><U></U><U><FONT COLOR=3D"#0000FF" SIZE=3D2 =
FACE=3D"Arial">file:E:/canoo/Porcode.properties:3</FONT></U></SPAN></A><S=
PAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">: Content is not =
allowed in prolog.</FONT></SPAN>
</P>

<P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Could you help me =
to solve the problem ?</FONT></SPAN>
</UL></UL>
<P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">thanks.</FONT></SPAN>
</P>
<UL><UL>
<P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Bellow is</FONT> =
<FONT SIZE=3D2 FACE=3D"Arial">source of html</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">, please as reference </FONT></SPAN>
</P>

<P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">for(int i =3D 0; i =
&lt; tmpPocCd.length; ++i) { %&gt;<BR>
&nbsp;&lt;tr CLASS=3D&quot;HL&quot;&gt;<BR>
&nbsp;&lt;td=A0 &gt; &lt;input type=3D&quot;checkbox&quot; =
name=3D&quot;selected&quot; value=3D&quot;&lt;%=3D i =
%&gt;&quot;&gt;&lt;/td&gt;<BR>
&nbsp;&lt;td&gt;&lt;%=3D i+1 %&gt; &lt;/td&gt;<BR>
&nbsp;&lt;td&gt;</FONT></SPAN>

<BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">=A0</FONT></SPAN>

<BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">&lt;input =
type=3D&quot;text&quot; name=3D&quot;pocCd&quot; size=3D&quot;5&quot; =
maxlength=3D&quot;5&quot; Value=3D&quot;&lt;%=3D tmpPocCd[i]=3D=3Dnull =
?&nbsp; : tmpPocCd[i] %&gt;&quot;&gt;</FONT></SPAN>

<BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&lt;/td&gt;<BR>
</FONT></SPAN>

<BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Bellow is test =
script, please as reference.</FONT></SPAN>
</P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;antcall =
target=3D&quot;Porcode&quot;/&gt;</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param =
name=3D&quot;pocCD.value&quot; value=3D&quot;${pocCD.value}&quot; =
/&gt;</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp; </FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;/antcall&gt;</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN =
LANG=3D"en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT =
SIZE=3D2 FACE=3D"Arial"> &lt;repeat count=3D&quot;3&quot; =
countername=3D&quot;row&quot;&gt;</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN =
LANG=3D"en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp; </FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN =
LANG=3D"en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp; &lt;setinputfield </FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN =
LANG=3D"en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">stepid=3D&quot;set Port Code in Select Update Sailing =
Schedule Detail page&quot;</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN =
LANG=3D"en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">name=3D&quot;pocCd&quot; </FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN =
LANG=3D"en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">value=3D&quot;${pocCD.value}&quot;/&gt;</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN =
LANG=3D"en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2 =
FACE=3D"Arial">&lt;/repeat&gt; </FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp; </FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&lt;target name=3D&quot;Porcode&quot; =
depends=3D&quot;mayPrintANTError&quot;&gt;</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; &lt;ant =
antfile=3D&quot;${webtest.home}/canoo/Porcode.properties&quot;/&gt;</FONT=
></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; </FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/target&gt;&nbsp; =
</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN =
LANG=3D"en-us">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp; Bellow is my =
Porcode.properties:</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
pocCD.value.0=3DA</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
pocCD.value.1=3DB</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
pocCD.value.2=3DC</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;</FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp; </FONT></SPAN></P>

<P ALIGN=3DJUSTIFY><SPAN LANG=3D"en-us"><FONT SIZE=3D2 =
FACE=3D"Arial">=A0Thanks a lot.</FONT></SPAN></P>
<BR>
</UL></UL>
</BODY>
</HTML>
------_=_NextPart_001_01C43957.E75CAD08--