I am new jWebUnit user and I am testing my web application with my jwebunit
test cases.
Here is my application flow -
I have test.jsp and simple DispatchAction calss called MyAction
In the test.jsp, on click of submit button (Go) , I am calling JavaScript
function to set the actionName parameter and submit the form.Below is my
code snippet -
function firstcheck(){
form.action = "/testProject/myAction.do?actionName=Go";
form.submit();
}
<html:form
action="/customerParametersAction"
onsubmit="javascript:firstcheck();return false;">
<html:form
<TD align="middle" width="10%">
<html:submit property="actionName" styleClass="black8">
<bean:message key="button.Go" />
</html:submit>
</TD>
Then in my JwebUnit class, I am doing the following -
public class MyTestCase extends WebTestCase {
public MyTestCase() { super(); }
public void setUp() throws Exception {
super.setUp();
beginAt("/wherever...");
/*** login instructions here ***/
}
}
public class MyTest extends MyTestCase {
public MyTest() { super(); }
public void setUp() throws Exception {
super.setUp ();
}
public testLink1() {
clickButtonByValue("Go");
}
}
After calling clickButtonByValue("Go") , I am always getting the error page
with message
"Action[/myAction] missing resource in key method map"
But if I run this application in from browser,every thing is working fine.
Thanks in advance of any pointers.
--------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
JWebUnit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users