18 messages in com.canoo.lists.webtestRe: [Webtest] Re: About setinputfield
FromSent OnAttachments
Tize Ma14 May 2004 12:03 
Marc Guillemot17 May 2004 00:27 
Tize Ma17 May 2004 10:17 
Marc Guillemot17 May 2004 12:48 
Tize Ma17 May 2004 14:09 
sunshuli17 May 2004 18:44 
Marc Guillemot18 May 2004 01:45 
sunshuli18 May 2004 02:15.jsp
sunshuli18 May 2004 02:18.jpg
Marc Guillemot18 May 2004 02:22 
Marc Guillemot18 May 2004 02:27 
sunshuli18 May 2004 02:34 
Marc Guillemot18 May 2004 06:53 
sunshuli18 May 2004 18:33 
Marc Guillemot19 May 2004 00:58 
sunshuli19 May 2004 01:06 
sunshuli19 May 2004 01:38 
Marc Guillemot19 May 2004 07:25 
Subject:Re: [Webtest] Re: About setinputfield
From:Marc Guillemot (mgui@yahoo.fr)
Date:05/18/2004 02:27:32 AM
List:com.canoo.lists.webtest

... and looking at the jpg, I'm absolutely sure, that you don't really want all
field to have the same name because you can't associate the values in the different columns of your sheet back on the
server.

Marc.

sunshuli wrote:

Hi,

The result with running the jsp is as:

thanks a lot.

----- Original Message ----- From: "Marc Guillemot" <mgui@yahoo.fr> To: <webt@lists.canoo.com> Sent: Tuesday, May 18, 2004 4:45 PM Subject: [Webtest] Re: About setinputfield

Hi,

can you please show the html code (ie what your browser receives) and not

the source of the "script" that generates it.

How do you imagine which field should be set in each iteration? You can't

get any correspondance on the server side

between your checkboxes and your text fields.

Marc.

sunshuli wrote:

Hi, All

There is a problem about setinputfield 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 base on loop

method,and

there is a same name for these fields in html.

I need to give multi different values into these same name textfileds

in

loop method. But, i can't get expect result.( We hope we can get the result ,A,B,C

not

porCD.value${i} in textfield) We got :

Porcode: [echo] pocCD.value [echo]

all: [echo] pocCD.value [echo] [echo] pocCD.value.${i} [echo]

BUILD SUCCESSFUL

Could you help me what's matter with my test script?

Bellow is source of html, please as reference

for(int i = 0; i < tmpPocCd.length; ++i) { %> <tr CLASS="HL"> <td > <input type="checkbox" name="selected" value="<%= i %>"></td> <td><%= i+1 %> </td> <td>

<input type="text" name="pocCd" size="5" maxlength="5" Value="<%= tmpPocCd[i]==null ? : tmpPocCd[i] %>"> </td>

Bellow is test script, please as reference.

....

<!--Repeat-->

<repeat count="3" countername="row">

<setinputfield

stepid="set Port Code in Select Update Sailing Schedule Detail page"

name="pocCd"

value="${pocCD.value}"/>

</repeat>

....

<target name = "Porcode" >

<loadproperties srcFile="${webtest.home}/canoo/Porcode1.properties"/>

<echo>Porcode pocCD.value.${i}

</echo>

<antcall target="porcodefile1" >

</antcall>

</target>

<target name="porcodefile1">

<propertyfile file="${webtest.home}/canoo/Porcode1.properties">

<entry key="i" type="int" operation="+" value="1"/>

</propertyfile>

<echo>procodefile1 pocCD.value.${i}

</echo>

<antcall target= "getvalue">

</antcall>

</target>

<target name="getvalue">

<loadproperties srcFile="${webtest.home}/canoo/Porcode1.properties"/>

<echo>getvalue pocCD.value.${i}

</echo>

<antcall target="all">

</antcall>

</target>

Bellow is my Porcode.properties:

i=1

pocCD.value.3=C

pocCD.value.2=B

pocCD.value.1=A

Anyone can help?

Thanks a lot.