[Webtest] Newbee Question: kann WebTest Buttons testen, welche jav ascript ausführen?

Kuno Ammann kuno.ammann@comit.ch
Thu, 21 Feb 2002 14:39:33 +0100


This is a multi-part message in MIME format.

--------------InterScan_NT_MIME_Boundary
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_003D_01C1BAE5.942B3020"

------=_NextPart_000_003D_01C1BAE5.942B3020
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

wir entwickeln eine web applikation, welche nicht nur ein submit button
pro from hat, sondern mehrere. sie f=FChren zum teil noch checkscipts
durch (mir ist klar, dass diese mit WebTest nicht getestet werden
k=F6nnen), und f=FChrt danach ein submit des froms durch. beispiel:
<html>
  <head>
    <title>Sign the Guest Book</title>
    <script language=3D"JavaScript1.2" type=3D"text/javascript">
      function doButtonFem() {
         document.CommentForm.submit();
         return;
      }
    </script>
  </head>
  <body>
    <h1>Sign the Guest Book</h1>
    <form action=3D"addEntry" method=3D"post" name=3D"CommentForm">
    <p>You can sign the guest book by filling out this form. You cannot
    include HTML in your comments, however, Zope will preserve your
linebreaks.
    </p>
    <table>
      <tr valign=3D"top" align=3D"left">
        <th>Your Name</th>
        <td><input type=3D"text" name=3D"guest_name" =
value=3D"Anonymous"></td>
      </tr>=20
      <tr valign=3D"top" align=3D"left">
        <th>Comments</th>
        <td><textarea cols=3D"60" rows=3D"10"
name=3D"comments"></textarea></td>
      </tr>   =20
      <tr><td></td><td><input type=3D"button" value=3D" Add Comments "
onClick=3D"doButtonFem();"></td></tr>
    </table>
    </form>
  </body>
</html>

1. Problem: WebTest konnte den button nicht mehr finden, da er nicht
mehr vom typ=3Dsubmit ist:
Failure: zopeTest(com.canoo.webtest.engine.ConfigurableTestCase): Button
with na
me <<not specified>> and value < Add Comments > not found!
Frage: kann man WebTest erweitern, dass er auch diese buttons findet?
hat das schon jemand gemacht?

2. Frage: w=FCrde das script ausgef=FChrt und der from submitted, wenn =
man
den button finden w=FCrde und ausl=F6sen w=FCrde?
(sorry ich kenne leider auch httpunit nicht :-(

vielen dank f=FCr die unterst=FCtzung.
mfg
kuno ammann


------=_NextPart_000_003D_01C1BAE5.942B3020
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.4630.0">
<TITLE>Newbee Question: kann WebTest Buttons testen, welche javascript =
ausf=FChren?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">wir entwickeln eine web applikation, =
welche nicht nur ein submit button pro from hat, sondern mehrere. sie =
f=FChren zum teil noch checkscipts durch (mir ist klar, dass diese mit =
WebTest nicht getestet werden k=F6nnen), und f=FChrt danach ein submit =
des froms durch. beispiel:</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&lt;html&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; &lt;head&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; &lt;title&gt;Sign =
the Guest Book&lt;/title&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; &lt;script =
language=3D&quot;JavaScript1.2&quot; =
type=3D&quot;text/javascript&quot;&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
function doButtonFem() {</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
document.CommentForm.submit();</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
return;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
}</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
&lt;/script&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; &lt;/head&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; &lt;body&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; &lt;h1&gt;Sign the =
Guest Book&lt;/h1&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; &lt;form =
action=3D&quot;addEntry&quot; method=3D&quot;post&quot; =
name=3D&quot;CommentForm&quot;&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; &lt;p&gt;You can =
sign the guest book by filling out this form. You cannot</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; include HTML in =
your comments, however, Zope will preserve your linebreaks.</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; &lt;/p&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
&lt;table&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr =
valign=3D&quot;top&quot; align=3D&quot;left&quot;&gt;</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;th&gt;Your =
Name&lt;/th&gt;</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;td&gt;&lt;input type=3D&quot;text&quot; =
name=3D&quot;guest_name&quot; =
value=3D&quot;Anonymous&quot;&gt;&lt;/td&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;/tr&gt; </FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;tr =
valign=3D&quot;top&quot; align=3D&quot;left&quot;&gt;</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;th&gt;Comments&lt;/th&gt;</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;td&gt;&lt;textarea cols=3D&quot;60&quot; rows=3D&quot;10&quot; =
name=3D&quot;comments&quot;&gt;&lt;/textarea&gt;&lt;/td&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;/tr&gt;&nbsp;&nbsp;&nbsp; </FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;input =
type=3D&quot;button&quot; value=3D&quot; Add Comments &quot; =
onClick=3D&quot;doButtonFem();&quot;&gt;&lt;/td&gt;&lt;/tr&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
&lt;/table&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
&lt;/form&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; &lt;/body&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;/html&gt;</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">1. Problem: WebTest konnte den button =
nicht mehr finden, da er nicht mehr vom typ=3Dsubmit ist:</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Failure: =
zopeTest(com.canoo.webtest.engine.ConfigurableTestCase): Button with =
na</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">me &lt;&lt;not specified&gt;&gt; and =
value &lt; Add Comments &gt; not found!</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Frage: kann man WebTest erweitern, =
dass er auch diese buttons findet? hat das schon jemand gemacht?</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">2. Frage: w=FCrde das script =
ausgef=FChrt und der from submitted, wenn man den button finden w=FCrde =
und ausl=F6sen w=FCrde?</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">(sorry ich kenne leider auch httpunit =
nicht :-(</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">vielen dank f=FCr die =
unterst=FCtzung.</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">mfg</FONT>

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

</BODY>
</HTML>
------=_NextPart_000_003D_01C1BAE5.942B3020--


--------------InterScan_NT_MIME_Boundary--