I am working to check a checkbox whose name is a bean’s property. I have tried using both the signatures which take a string/string and value.

My code is:

 

checkCheckbox(/com/sch/ua/com/sch/ua/reservation/CreateReservationFormHandler.agreeReservationTerms", "on");

checkCheckbox("/com/sch/ua/reservation/CreateReservationFormHandler.agreeReservationTerms ");

 

but this results in a failure

 

1) testQuickResSubmit(reservation.ExampleWebTestCase)junit.framework.AssertionFailedError: Did not find form element with name [/com/sch/ua/com/sch/ua/reservation/CreateReservationFormHandler.agreeReservationTerms].

        at net.sourceforge.jwebunit.WebTester.assertFormElementPresent(WebTester.java:307)

        at net.sourceforge.jwebunit.WebTester.checkCheckbox(WebTester.java:820)

        at net.sourceforge.jwebunit.WebTestCase.checkCheckbox(WebTestCase.java:329)

        at reservation.ExampleWebTestCase.testQuickResSubmit(ExampleWebTestCase.java:97)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at reservation.ExampleWebTestCase.main(ExampleWebTestCase.java:114)

 

any idea what could be the reason.. please help..

-thanks

pradnya

Reply via email to