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

Marc Guillemot webtest@lists.canoo.com
Mon, 17 May 2004 21:48:31 +0200


 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 
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 
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 
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="javascript:creatComponent('tabform','createLibrary.do?appName=CIApp&lqfm=default&act=Create&treemode=1')" > class="tablinks">Save</a>
> For some reason, if I use: <clicklink
> 			    	   label="Save"         
> 			    	   stepid="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
> 
> -----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
> 
> 
> checkboxes and select combo are members of forms and their values are therefore only sent when the owning form is 
> submitted. It has nothing to do with a clicklink.
> 
> Marc.
> 
> Tize Ma wrote:
> 
>>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 
>>Canoo Webtest. Whenever  there are select field or checkbox, I have to 
>>use invoke step to submit the correct values for the parameters because 
>>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 
>>ClickLink and SetInputfield that Marc Guillemont sent to Glen Cordrey. 
>>View source shows the page like below. Could anyone tell how to make it 
>>work (using setselectfield, setcheckbox, and clicklink, instead of invoke)?
>>
>>Thanks a lot.
>>Tize
>>
>>
>>
>><html>
>>
>>
>><head>
>><title></title>
>><link href="styles.css" rel="stylesheet" type="text/css">
>><script language="JavaScript" src="scripts/adminUtils.js"></script>
>></head>
>><body onresize="ResizeBodyWindow(56)">
>>
>>
>>
>><table width="100%" height="31" background="images/path_bg.gif" 
>>border="0" cellpadding="0" cellspacing="0"><tr><td height="31" 
>>nowrap><div align="right"><a class="headerlinks" 
>>href="javascript:updateNavAndDoc('retrievalware.do?selTreeNode=1&path=RetrievalWare{}&treemode=1', 
>>'tree.do?selTreeNode=1&path=RetrievalWare{}');">RetrievalWare</a><span 
>>class="body"> :: </span><a class="headerlinks" 
>>href="javascript:updateNavAndDoc('apps.do?name=Applications&selTreeNode=1&path=RetrievalWare{}Applications{}&treemode=1', 
>>'tree.do?selTreeNode=1&path=RetrievalWare{}Applications{}');">Applications</a><span 
>>class="body"> :: </span><a class="headerlinks" 
>>href="javascript:updateNavAndDoc('app.do?name=CIApp&selTreeNode=1&path=RetrievalWare{}Applications{}CIApp{}&treemode=1', 
>>'tree.do?selTreeNode=1&path=RetrievalWare{}Applications{}CIApp{}');">CIApp</a><span 
>>class="body"> :: </span><a class="headerlinksselected" 
>>href="libraries.do?appName=CIApp&selTreeNode=1&path=RetrievalWare{}Applications{}CIApp{}Libraries{}&treemode=1&refreshTree=2" 
>>onClick="return 
>>isPageChangeAllowed();">Libraries</a>&nbsp;&nbsp;</div></td></tr></table>
>>
>>
>>
>>       
>><table width="100%" height="25" border="0" cellpadding="0" 
>>cellspacing="0" background="images/main_actions_bg.gif" 
>>class="actionsbuttonbar"><tr> <td><table height="25" border="0" 
>>cellpadding="0" cellspacing="0"><tr><td NOWRAP 
>>background="images/main_actions_selected_bg.gif"><div align="center"><a 
>>class="actionsbutton"><strong>&nbsp;&nbsp;&nbsp;&nbsp;Create&nbsp;&nbsp;&nbsp;&nbsp;</strong></a></div></td><td 
>>NOWRAP width="1" bgcolor="999999"><div 
>>align="center"></div></td></tr></table></td></tr></table>
>>
>>
>>
>><div id="divBodyContent" class="summary" >
>>
>>
>><div id="errorDisplayDiv">
>><table width="98%" border="0" cellspacing="0" cellpadding="0" 
>>class="body" align="center">
>>    <tr>
>>        <td>
>>           
>>        </td>
>>    </tr>
>></table>
>></div>
>>
>><br>
>>
>>
>>
>>
>>
>>
>>   
>>   
>>    <FORM name="tabform" id="tabform"  method=POST>
>>   
>>    <table width="100%" border="0" cellspacing="5" cellpadding="0">
>>        <tr>
>>            <td>
>>                <table width="100%" border="0" cellspacing="0" 
>>cellpadding="2">
>>                    <tr>
>>                        <td class="summarytitle">Create a new library 
>>for CIApp</td>
>>                    </tr>
>>                    <tr><td>&nbsp;</td></tr>
>>                    <tr>
>>                        <td><table align="center" width="95%" border="0" 
>>cellpadding="0" cellspacing="2" class="body">
>>                            <TR>
>>                                <TD colspan="2" class="summarybar">Enter 
>>Library Type and Name</TD>
>>                            </TR>
>>                            <tr><td>&nbsp;</td></tr>
>>                            <TR>
>>                                <TD width="25%" align="left">Library 
>>Type:</TD>
>>                                <TD width="75%" align="left">
>>                                    <SELECT class="libraryselect" 
>>name="libraryType">
>>                                       <OPTION 
>>value="DOCUMENTUM">Documentum</OPTION>
>>                                       <OPTION 
>>value="FILENET">FileNET</OPTION>
>>                                       <OPTION value="FILESYSTEM">File 
>>System</OPTION>
>>                                       <OPTION value="LOTUSNOTES">Lotus 
>>Notes</OPTION>
>>                                       <OPTION value="MSEXCHANGE">MS 
>>Exchange</OPTION>
>>                                       <OPTION value="RDB_DB2">RDB 
>>DB2</OPTION>
>>                                       <OPTION value="RDB_MS_SQL">RDB 
>>MSSQL</OPTION>
>>                                       <OPTION value="RDB_ODBC">RDB 
>>ODBC</OPTION>
>>                                       <OPTION value="RDB_ORACLE_8">RDB 
>>Oracle 8i</OPTION>
>>                                       <OPTION value="RDB_ORACLE_9">RDB 
>>Oracle 9i</OPTION>
>>                                       <OPTION value="RDB_SYBASE">RDB 
>>Sybase</OPTION>
>>                                       <OPTION value="RDB_INFORMIX">RDB 
>>Informix</OPTION>
>>                                      
>>                                       <OPTION 
>>value="SPIDER">Spider</OPTION>
>>                                       <OPTION value="SRRDB">Screening 
>>Room RDB</OPTION>
>>                                    </SELECT>
>>                                </TD>
>>                            </TR>
>>                            <TR>
>>                                <TD width="25%" align=left><FONT 
>>color=red>*Search Display Name:</FONT></TD>
>>                                <TD width="75%" align=left><INPUT 
>>name="userFriendlyLibName" class="libraryinput"></TD>
>>                            </TR>
>>                            <TR>
>>                                <TD width="25%" align=left><FONT 
>>color=red>*Library Internal Name:</FONT></TD>
>>                                <TD width="75%" align=left><INPUT 
>>name="libraryName" class="libraryinput"></TD>
>>                            </TR>
>>                        </table></td>
>>                    </tr>
>>                   
>>                        <TR>
>>                            <td>
>>                                <table align="center" width="95%" 
>>border="0" cellpadding="0" cellspacing="2" class="body">
>>
>>                                    <TR>
>>                                        <TD   align=left ><INPUT 
>>type=checkbox name="enableCNC" checked > Is this library used for 
>>Categorization and Classification?</TD>
>>
>>                                    </TR>
>>                                </table>
>>                            </td>
>>                        </tr>
>>                   
>>                </table>
>>            </td>
>>        </tr>
>>        <tr>
>>            <td>
>>                <br> <hr size="1" noshade>
>>                <TABLE width="95%" border="0" cellspacing="0" 
>>cellpadding="2">
>>                    <TR>
>>                        <td>
>>                           
>>                              
>>                              
>>                              
>>
>>                              
>>                              
>>                              
>>                            <table width="100%" border="0" align="right" 
>>cellpadding="0" cellspacing="0" class="button"><tr><td><table width="75" 
>>border="0" align="right" cellspacing="0" cellpadding="0" 
>>class="button"><tr><td>&nbsp;&nbsp;</td><td width="4"><img 
>>src="images/buttonsall_enabled_left.gif" width="5" height="16"></td><td 
>>width="67" background="images/buttonsall_enabled_bg.gif"><div 
>>align="center"><a 
>>href="javascript:creatComponent('tabform','createLibrary.do?appName=CIApp&lqfm=default&act=Create&treemode=1')" 
>>class="tablinks">Save</a></div></td><td width="4"><img 
>>src="images/buttonsall_enabled_right.gif" width="5" 
>>height="16"></td></tr></table></td><td  width="10"><table width="75" 
>>border="0" align="right" cellspacing="0" cellpadding="0" 
>>class="button"><tr><td>&nbsp;&nbsp;</td><td width="4"><img 
>>src="images/buttonsall_enabled_left.gif" width="5" height="16"></td><td 
>>width="67" background="images/buttonsall_enabled_bg.gif"><div 
>>align="center"><a href="librariesView.jsp?appName=CIApp&treemode=1" 
>>class="tablinks">Cancel</a></div></td><td width="4"><img 
>>src="images/buttonsall_enabled_right.gif" width="5" 
>>height="16"></td></tr></table></td></tr></table>
>>
>>                        </td>
>>                     </TR>
>>                </table>
>>            </td>
>>        </tr>
>>    </TABLE>
>></FORM>
>>
>>
>>
>>
>></div>
>><script>
>>    ResizeBodyWindow(56);
>></script>
>>
>><script language="javascript">var 
>>helpContext="config.library.create";</script>
>></body>
>>
>></html>
>>
> 
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest