[Webtest] Re: Values from setselectfield and setcheckbox are not submitted

Tize Ma webtest@lists.canoo.com
Mon, 17 May 2004 17:10:07 -0400


Thanks again, Marc.
So it looks like the solution is to create a version of SetSelectField =
and SetCheckBox similar to the "form" version of SetInputField. If I =
want to do that, what do I need to modify from the existing codes? My =
background: I know Java, and don't know httpunit.
Tize

-----Original Message-----
From: Marc Guillemot [mailto:mguillemot@yahoo.fr]
Sent: Monday, May 17, 2004 3:49 PM
To: webtest@lists.canoo.com
Subject: [Webtest] Re: Values from setselectfield and setcheckbox are
not submitted


 From the doc: =
(http://webtest.canoo.com/webtest/manual/syntax.html#setselectfield)
All values set via this statement are stored in a temporary parameter =
cache and added to the next request triggered via=20
a <clickbutton> step.

Because you don't use a clickbutton but a clicklink, the values never =
get really transmitted to the form. You don't have=20
the problem with the text fields, because you're using a version of =
setinputfield that directly sets the fields.
As I've already said, I don't like this "strategy" and I think that it =
should be changed but it is the current state of=20
webtest.

Marc.


Tize Ma wrote:
> Hi, Marc,
>   Thank you very much for responding my question. In my situation, =
submitting the form is done by click a Save link, which is like: <a > =
href=3D"javascript:creatComponent('tabform','createLibrary.do?appName=3DC=
IApp&lqfm=3Ddefault&act=3DCreate&treemode=3D1')" > =
class=3D"tablinks">Save</a>
> For some reason, if I use: <clicklink
> 			    	   label=3D"Save"        =20
> 			    	   stepid=3D"Click Save Button" />
> the form is submitted, but the values of the selectfield and checkbox =
are not picked up if I use setselectfield and setcheckbox steps. Any =
idea why is that?
> Thanks.
> Tize
>=20
> -----Original Message-----
> From: Marc Guillemot [mailto:mguillemot@yahoo.fr]
> Sent: Monday, May 17, 2004 3:27 AM
> To: webtest@lists.canoo.com
> Subject: [Webtest] Re: Values from setselectfield and setcheckbox are
> not submitted
>=20
>=20
> checkboxes and select combo are members of forms and their values are =
therefore only sent when the owning form is=20
> submitted. It has nothing to do with a clicklink.
>=20
> Marc.
>=20
> Tize Ma wrote:
>=20
>>Hello, everyone,
>>    Looking through the WebTest Archives, it seems no one had problems =

>>with setselectfield and setcheckbox steps. I am testing  a web app =
using=20
>>Canoo Webtest. Whenever  there are select field or checkbox, I have to =

>>use invoke step to submit the correct values for the parameters =
because=20
>>clicklink for the Save does not pick up the values for the selectfield =

>>and checkbox. I am using build 385, with the modified versions of=20
>>ClickLink and SetInputfield that Marc Guillemont sent to Glen Cordrey. =

>>View source shows the page like below. Could anyone tell how to make =
it=20
>>work (using setselectfield, setcheckbox, and clicklink, instead of =
invoke)?
>>
>>Thanks a lot.
>>Tize
>>
>>
>>
>><html>
>>
>>
>><head>
>><title></title>
>><link href=3D"styles.css" rel=3D"stylesheet" type=3D"text/css">
>><script language=3D"JavaScript" =
src=3D"scripts/adminUtils.js"></script>
>></head>
>><body onresize=3D"ResizeBodyWindow(56)">
>>
>>
>>
>><table width=3D"100%" height=3D"31" background=3D"images/path_bg.gif"=20
>>border=3D"0" cellpadding=3D"0" cellspacing=3D"0"><tr><td height=3D"31" =

>>nowrap><div align=3D"right"><a class=3D"headerlinks"=20
>>href=3D"javascript:updateNavAndDoc('retrievalware.do?selTreeNode=3D1&pa=
th=3DRetrievalWare{}&treemode=3D1',=20
>>'tree.do?selTreeNode=3D1&path=3DRetrievalWare{}');">RetrievalWare</a><s=
pan=20
>>class=3D"body"> :: </span><a class=3D"headerlinks"=20
>>href=3D"javascript:updateNavAndDoc('apps.do?name=3DApplications&selTree=
Node=3D1&path=3DRetrievalWare{}Applications{}&treemode=3D1',=20
>>'tree.do?selTreeNode=3D1&path=3DRetrievalWare{}Applications{}');">Appli=
cations</a><span=20
>>class=3D"body"> :: </span><a class=3D"headerlinks"=20
>>href=3D"javascript:updateNavAndDoc('app.do?name=3DCIApp&selTreeNode=3D1=
&path=3DRetrievalWare{}Applications{}CIApp{}&treemode=3D1',=20
>>'tree.do?selTreeNode=3D1&path=3DRetrievalWare{}Applications{}CIApp{}');=
">CIApp</a><span=20
>>class=3D"body"> :: </span><a class=3D"headerlinksselected"=20
>>href=3D"libraries.do?appName=3DCIApp&selTreeNode=3D1&path=3DRetrievalWa=
re{}Applications{}CIApp{}Libraries{}&treemode=3D1&refreshTree=3D2"=20
>>onClick=3D"return=20
>>isPageChangeAllowed();">Libraries</a>&nbsp;&nbsp;</div></td></tr></tabl=
e>
>>
>>
>>
>>      =20
>><table width=3D"100%" height=3D"25" border=3D"0" cellpadding=3D"0"=20
>>cellspacing=3D"0" background=3D"images/main_actions_bg.gif"=20
>>class=3D"actionsbuttonbar"><tr> <td><table height=3D"25" border=3D"0"=20
>>cellpadding=3D"0" cellspacing=3D"0"><tr><td NOWRAP=20
>>background=3D"images/main_actions_selected_bg.gif"><div =
align=3D"center"><a=20
>>class=3D"actionsbutton"><strong>&nbsp;&nbsp;&nbsp;&nbsp;Create&nbsp;&nb=
sp;&nbsp;&nbsp;</strong></a></div></td><td=20
>>NOWRAP width=3D"1" bgcolor=3D"999999"><div=20
>>align=3D"center"></div></td></tr></table></td></tr></table>
>>
>>
>>
>><div id=3D"divBodyContent" class=3D"summary" >
>>
>>
>><div id=3D"errorDisplayDiv">
>><table width=3D"98%" border=3D"0" cellspacing=3D"0" cellpadding=3D"0"=20
>>class=3D"body" align=3D"center">
>>    <tr>
>>        <td>
>>          =20
>>        </td>
>>    </tr>
>></table>
>></div>
>>
>><br>
>>
>>
>>
>>
>>
>>
>>  =20
>>  =20
>>    <FORM name=3D"tabform" id=3D"tabform"  method=3DPOST>
>>  =20
>>    <table width=3D"100%" border=3D"0" cellspacing=3D"5" =
cellpadding=3D"0">
>>        <tr>
>>            <td>
>>                <table width=3D"100%" border=3D"0" cellspacing=3D"0"=20
>>cellpadding=3D"2">
>>                    <tr>
>>                        <td class=3D"summarytitle">Create a new =
library=20
>>for CIApp</td>
>>                    </tr>
>>                    <tr><td>&nbsp;</td></tr>
>>                    <tr>
>>                        <td><table align=3D"center" width=3D"95%" =
border=3D"0"=20
>>cellpadding=3D"0" cellspacing=3D"2" class=3D"body">
>>                            <TR>
>>                                <TD colspan=3D"2" =
class=3D"summarybar">Enter=20
>>Library Type and Name</TD>
>>                            </TR>
>>                            <tr><td>&nbsp;</td></tr>
>>                            <TR>
>>                                <TD width=3D"25%" =
align=3D"left">Library=20
>>Type:</TD>
>>                                <TD width=3D"75%" align=3D"left">
>>                                    <SELECT class=3D"libraryselect"=20
>>name=3D"libraryType">
>>                                       <OPTION=20
>>value=3D"DOCUMENTUM">Documentum</OPTION>
>>                                       <OPTION=20
>>value=3D"FILENET">FileNET</OPTION>
>>                                       <OPTION =
value=3D"FILESYSTEM">File=20
>>System</OPTION>
>>                                       <OPTION =
value=3D"LOTUSNOTES">Lotus=20
>>Notes</OPTION>
>>                                       <OPTION value=3D"MSEXCHANGE">MS =

>>Exchange</OPTION>
>>                                       <OPTION value=3D"RDB_DB2">RDB=20
>>DB2</OPTION>
>>                                       <OPTION =
value=3D"RDB_MS_SQL">RDB=20
>>MSSQL</OPTION>
>>                                       <OPTION value=3D"RDB_ODBC">RDB=20
>>ODBC</OPTION>
>>                                       <OPTION =
value=3D"RDB_ORACLE_8">RDB=20
>>Oracle 8i</OPTION>
>>                                       <OPTION =
value=3D"RDB_ORACLE_9">RDB=20
>>Oracle 9i</OPTION>
>>                                       <OPTION =
value=3D"RDB_SYBASE">RDB=20
>>Sybase</OPTION>
>>                                       <OPTION =
value=3D"RDB_INFORMIX">RDB=20
>>Informix</OPTION>
>>                                     =20
>>                                       <OPTION=20
>>value=3D"SPIDER">Spider</OPTION>
>>                                       <OPTION =
value=3D"SRRDB">Screening=20
>>Room RDB</OPTION>
>>                                    </SELECT>
>>                                </TD>
>>                            </TR>
>>                            <TR>
>>                                <TD width=3D"25%" align=3Dleft><FONT=20
>>color=3Dred>*Search Display Name:</FONT></TD>
>>                                <TD width=3D"75%" align=3Dleft><INPUT=20
>>name=3D"userFriendlyLibName" class=3D"libraryinput"></TD>
>>                            </TR>
>>                            <TR>
>>                                <TD width=3D"25%" align=3Dleft><FONT=20
>>color=3Dred>*Library Internal Name:</FONT></TD>
>>                                <TD width=3D"75%" align=3Dleft><INPUT=20
>>name=3D"libraryName" class=3D"libraryinput"></TD>
>>                            </TR>
>>                        </table></td>
>>                    </tr>
>>                  =20
>>                        <TR>
>>                            <td>
>>                                <table align=3D"center" width=3D"95%"=20
>>border=3D"0" cellpadding=3D"0" cellspacing=3D"2" class=3D"body">
>>
>>                                    <TR>
>>                                        <TD   align=3Dleft ><INPUT=20
>>type=3Dcheckbox name=3D"enableCNC" checked > Is this library used for=20
>>Categorization and Classification?</TD>
>>
>>                                    </TR>
>>                                </table>
>>                            </td>
>>                        </tr>
>>                  =20
>>                </table>
>>            </td>
>>        </tr>
>>        <tr>
>>            <td>
>>                <br> <hr size=3D"1" noshade>
>>                <TABLE width=3D"95%" border=3D"0" cellspacing=3D"0"=20
>>cellpadding=3D"2">
>>                    <TR>
>>                        <td>
>>                          =20
>>                             =20
>>                             =20
>>                             =20
>>
>>                             =20
>>                             =20
>>                             =20
>>                            <table width=3D"100%" border=3D"0" =
align=3D"right"=20
>>cellpadding=3D"0" cellspacing=3D"0" class=3D"button"><tr><td><table =
width=3D"75"=20
>>border=3D"0" align=3D"right" cellspacing=3D"0" cellpadding=3D"0"=20
>>class=3D"button"><tr><td>&nbsp;&nbsp;</td><td width=3D"4"><img=20
>>src=3D"images/buttonsall_enabled_left.gif" width=3D"5" =
height=3D"16"></td><td=20
>>width=3D"67" background=3D"images/buttonsall_enabled_bg.gif"><div=20
>>align=3D"center"><a=20
>>href=3D"javascript:creatComponent('tabform','createLibrary.do?appName=3D=
CIApp&lqfm=3Ddefault&act=3DCreate&treemode=3D1')"=20
>>class=3D"tablinks">Save</a></div></td><td width=3D"4"><img=20
>>src=3D"images/buttonsall_enabled_right.gif" width=3D"5"=20
>>height=3D"16"></td></tr></table></td><td  width=3D"10"><table =
width=3D"75"=20
>>border=3D"0" align=3D"right" cellspacing=3D"0" cellpadding=3D"0"=20
>>class=3D"button"><tr><td>&nbsp;&nbsp;</td><td width=3D"4"><img=20
>>src=3D"images/buttonsall_enabled_left.gif" width=3D"5" =
height=3D"16"></td><td=20
>>width=3D"67" background=3D"images/buttonsall_enabled_bg.gif"><div=20
>>align=3D"center"><a =
href=3D"librariesView.jsp?appName=3DCIApp&treemode=3D1"=20
>>class=3D"tablinks">Cancel</a></div></td><td width=3D"4"><img=20
>>src=3D"images/buttonsall_enabled_right.gif" width=3D"5"=20
>>height=3D"16"></td></tr></table></td></tr></table>
>>
>>                        </td>
>>                     </TR>
>>                </table>
>>            </td>
>>        </tr>
>>    </TABLE>
>></FORM>
>>
>>
>>
>>
>></div>
>><script>
>>    ResizeBodyWindow(56);
>></script>
>>
>><script language=3D"javascript">var=20
>>helpContext=3D"config.library.create";</script>
>></body>
>>
>></html>
>>
>=20
>=20
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest


_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest