[Webtest] Canoo WebTest Tool ends in error during submission
of for m with data.
Jeannie Graham
webtest@lists.canoo.com
Wed, 9 Jun 2004 17:06:53 -0700
Hello there,
I don't think JavaScript is supported through Canoo, but once when a
clicklink didn't work for me, I tried setting the label to null, "". And it
worked for me. See snippet below...
<clicklink
stepid="Click Document Center button/link"
label=""
href="/RCCController.srv?action=RCC_MAIN" />
-----Original Message-----
From: Arvind Joshi [mailto:arvind.joshi@oracle.com]
Sent: Tuesday, June 08, 2004 11:13 PM
To: webtest@gate2.canoo.com
Subject: [Webtest] Canoo WebTest Tool ends in error during submission of
for m with data.
Hi all,
I was evaluating the Canoo WebTest Tool for automated testing of web
applications.
I am "Cut - Pasting" the error message ,and the syntax , below.
After the error message , I have pasted the Actual Code ( xml file) which
gave this error.
What I was trying to achieve:
1) Login to the Site , with username / password . It takes me to the
Application page.
2) Click on one of the tab of the Application (tab) page . After that
3) Click on the link on the resultant page
4) The final pages has few fields, which I am trying to populate through the
xml-code , and do a "submit"
The Steps 1 - 3 goes through fine.
But fails on the submission of the form with the data.
I would like to know :
1) Whether I had made any mistake ?
2) Is this functionality supported , by this product ?
3) Or is there any work-around for this?
4) The Submission of the form involves a call to "javascript". Is this a
supported feature? If not, is there a way-around?
Thanks,
Arvind
I got the following error:
crmcw01:/export/home/crmcw1e>ant -buildfile Userid.xml -v
Apache Ant version 1.6.1 compiled on February 12 2004
Buildfile: Userid.xml
Detected Java version: 1.3 in: /opt/java1.3/jre
Detected OS: HP-UX
parsing buildfile /export/home/crmcw1e/WEBTESTHOME/webtests/Userid.xml with
URI = file:///export/home/crmcw1e/WEBTESTHOME/webtests/Userid.xml
Project base dir set to: /export/home/crmcw1e/WEBTESTHOME/webtests
Build sequence for target `main' is [main]
Complete build sequence is [main, ]
main:
BUILD FAILED
Test step clicklink named "Click The Apply Link" failed with message "No
link found in page
http://crmcw01.us.oracle.com:6666/OA_HTML/amsProdCreatMain.jsp?jtfm0=_0_1_0_
-1_f_nv_&jttst0=1000196_21706%2C21706%2C-1%2C0%2C&etfm1=&jfn=ZGF57ABF2209F6D
73FB5A3487ED5417C3E10E019B03AA0C30903004E05D38019F1992B1D8C797A972BCE4A48DD2
BE806A478&PAGE.OBJ.objType=PROD: label <Apply>, htmlId <null>"
at
com.canoo.webtest.ant.TestSpecificationTask.stopBuildIfNeeded(TestSpecificat
ionTask.java:78)
at
com.canoo.webtest.ant.TestSpecificationTask.execute(TestSpecificationTask.ja
va:72)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:301)
at org.apache.tools.ant.Target.performTasks(Target.java:328)
at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
at org.apache.tools.ant.Main.runBuild(Main.java:632)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
My Code is :[ Userid.xml]
<project name="SimpleTest" basedir="." default="main">
<taskdef
file="/export/home/crmcw1e/WEBTESTHOME/webtestTaskdefs.properties">
<classpath>
<fileset dir="/export/home/crmcw1e/WEBTESTHOME"
includes="**/lib/*.jar" />
</classpath>
</taskdef>
<target name="main">
<testSpec name="myTest">
<config
showhtmlparseroutput="true"
host="crmcw01.us.oracle.com"
port="6666"
protocol="http"
saveresponse="yes"
basepath="OA_HTML" />
<steps>
<invoke
stepid="goto start page"
url="jtflogin.jsp" />
<setinputfield stepid="set user name"
name="username"
value="mktmgr" />
<setinputfield stepid="set password"
name="password"
value="welcome" />
<clickbutton
label="Go"
stepid="Click the submit button" />
<verifytitle stepid="Marketing Online : Home"
text="Marketing Online : Home" />
<clicklink stepid="The Product Page"
label="Product"
save="mktmgr"
href="PAGE.OBJ.objType=PROD"/>
<verifytitle stepid="Marketing Online : Products"
text="Marketing Online : Products" />
<clicklink stepid="The Create Product Page"
label="Create Product"
save="CrProd"
href="jtfm0=_0_1_0_-1_f_"/>
<verifytitle stepid="Marketing Online : Create Product"
text="Marketing Online : Create Product" />
<setcheckbox stepid="Click Service Radio Button"
name="AmsProductCreate.OBJ.itemSetupType"
value="S"
checked="true" />
<setinputfield stepid="set Product name"
name="AmsProductCreate.OBJ.productName"
value="Canoo Dream" />
<setinputfield stepid="set Product Number"
name="AmsProductCreate.OBJ._JTFSKFF_INV_MSTK_101__"
value="4444" />
<setinputfield stepid="set Owner Name"
name="AmsProductCreate.OBJ.ownerName"
value="Smith, Ms. Elizabeth" />
<setselectfield
stepid="Set 1st MultiSelect value to KIT"
name="AmsProductCreate.OBJ.itemType"
value="K" />
<setinputfield stepid="set Description"
name="AmsProductCreate.OBJ.description"
value="Buy Canoo Dream and get ANT Hill Free" />
<clicklink stepid="Click The Apply Link"
label="Apply"
href="#" />
</steps>
</testSpec>
</target>
</project>
This is what is the (partly & broken) content of the source of the Actual
HTML page ( where "form" with data , is submited ):
---------------------------
<!-- Local JavaScript functions go here -->
<script language="JavaScript">
function createProduct()
{
getField("ProductCreatForm","JTFValidateFlag").value = "Yes";
doAsfAction("ProductCreatForm","CRE");
}
---------------------------
<tr>
<td> </td><td> </td><td> </td>
<td nowrap align="right">
<a onclick="ProductCreatForm.reset();" href="#">Clear</a>
<a onclick="createProduct()" href="#">Apply</a>
</td>
</tr>
-----------------------------
<form name="ProductCreatForm" action=
"amsProdCreatMain.jsp?jtfm0=_0_1_0_-1_f_nv_&jttst0=1000196_21706%2C21706%2C-
1%2C0%2C&etfm1=&jfn=ZG10B5C8BD02C701E4A27F7339D228E3D543C667C498FD96CDFEE2A0
E3BEF2A1EDB55BA0CBD33348989FB37F4EC8FC8CAC92&PAGE.OBJ.objType=PROD"
method="post">
--------------------------------------------------------------
Thanks is advance for any advice / suggestion / Solution.
Arvind
Arvind Joshi
Application & Industry Solutions
North America Industries
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest