hi all please help in getting support for javascript in fitnesse
yesterday i have posed the problem of java scripting support in fittnesse i
got the reply solution but it didn't work.
the reply solution i got is to place the path of js-1.5R4.1.jar in the !path
i placed it and tried but it does not work
The synatax i placed is
!path D:\lab\Apps\jwebunit-1.2\lib\js-1.5R4.1.jar
!path D:\Lab\Apps\jwebunit-1.2\lib\*.jar
!path D:\Lab\Apps\jwebunit-1.2\jwebunit-1.2.jar
!path D:\Lab\Apps\jwebunit-1.2\custom-additions\fit-hacked-version\classes
The code here is the validation action that we are going to do
<form name="releaseObject" method="POST"
action="/cdms/saveCreateRelease.action" onsubmit=" return
validateReleaseObject(this); ">
<script language="javascript">
function validateReleaseObject(thisform)
{
if((releaseObject.unitGroupCode.value.length)==0)
{
alert("Unit Group Code is mandatory");
releaseObject.unitGroupCode.focus();
return false;
}
if((releaseObject.engDesignAreaCode.value.length)==0)
{
alert("Eng Design Area Code is mandatory");
releaseObject.engDesignAreaCode.focus();
return false;
}
}
</script>
The below attached is the Fitnesse Exception code i am getting while in
creating a entity
----------------------------------------------------------------------------
----
java.lang.RuntimeException: com.meterware.httpunit.ScriptException: Event '
return validateReleaseObject(this); ' failed: ReferenceError:
"releaseObject" is not defined. (httpunit; line 3)
at
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.handleScriptEx
ception(JavaScript.java:192)
at
com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine.performEvent(J
avaScript.java:165)
at
com.meterware.httpunit.scripting.ScriptableDelegate.doEvent(ScriptableDelega
te.java:55)
at
com.meterware.httpunit.WebRequestSource.submitRequest(WebRequestSource.java:
224)
at com.meterware.httpunit.WebForm.doFormSubmit(WebForm.java:75)
at com.meterware.httpunit.WebForm.submit(WebForm.java:67)
at com.meterware.httpunit.WebForm.submit(WebForm.java:56)
at
net.sourceforge.jwebunit.HttpUnitDialog.submit(HttpUnitDialog.java:542)
at net.sourceforge.jwebunit.WebTester.submit(WebTester.java:858)
at net.sourceforge.jwebunit.fit.WebFixture.submit(WebFixture.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sourceforge.jwebunit.fit.WebFixture.doCells(WebFixture.java:70)
at fit.Fixture.doRow(Unknown Source)
at fit.Fixture.doRows(Unknown Source)
at fit.Fixture.doTable(Unknown Source)
at fit.Fixture.doTables(Unknown Source)
at fit.FitServer.process(Unknown Source)
at fit.FitServer.run(Unknown Source)
at fit.FitServer.main(Unknown Source)
at
net.sourceforge.jwebunit.HttpUnitDialog.submit(HttpUnitDialog.java:544)
at net.sourceforge.jwebunit.WebTester.submit(WebTester.java:858)
at net.sourceforge.jwebunit.fit.WebFixture.submit(WebFixture.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sourceforge.jwebunit.fit.WebFixture.doCells(WebFixture.java:70)
at fit.Fixture.doRow(Unknown Source)
at fit.Fixture.doRows(Unknown Source)
at fit.Fixture.doTable(Unknown Source)
at fit.Fixture.doTables(Unknown Source)
at fit.FitServer.process(Unknown Source)
at fit.FitServer.run(Unknown Source)
at fit.FitServer.main(Unknown Source)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users