[Webtest] having problems with clickbutton, button not found.
Allan Murphy
webtest@lists.canoo.com
Thu, 17 Jul 2003 15:52:19 -0400
last post was a mess. i hope this one is better. :P
Ok. buttons should be inside forms, i tried that but they didnt work as
well.
this is my full code, not working. (cant find the button)
---------------------
xml:
<project name="SimpleTest" basedir="." default="main">
<property name="webtest.home" value="d:\webtest"/>
<taskdef file="${webtest.home}/webtestTaskdefs.properties">
<classpath>
<fileset dir="${webtest.home}" includes="**/lib/*.jar"/>
</classpath>
</taskdef>
<target name="main">
<testSpec name="myTest">
<config
host="localhost"
port="80"
protocol="http"
basepath=""
showhtmlparseroutput="true"
saveresponse="true"
resultpath="/tmp/results" />
<steps>
<invoke stepid="get Login Page" url="test.htm" />
<clickbutton label="Save" stepid="Click the Save button"/>
</steps>
</testSpec>
</target>
</project>
---------------------------
html:
<html>
<head>
<title>no title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0">
<form>
<input type="button" value="Save" />
</form>
</body>
</html>
--------------------------
result:
D:\>ant -buildfile test.xml
Buildfile: test.xml
main:
BUILD FAILED
Test step clickbutton named "Click the Save button" failed with message
"Button
with name <<not specified>> and value <Save> not found!"
Total time: 6 seconds
--------------------
PLOP!
can someone help or have a littele "working" example (html + xml) of
clickbutton?
thanks.
Allan Murphy M.
Ing.Informatico
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail