I don't know what is wrong here, but I can give you the following pointers:
- Do you have set the working form?
- Have you tried setting the id to
/com/sch/ua/reservation/CreateReservationFormHandler.agreeReservationTerms?
Can you send the markup showing the checkbox and the surrounding form?
JWebUnit is complaining it can't find the checkbox, so it helps if you
also provide the markup.
Martijn
Sute, Pradnya (ASAP Staffing) wrote:
> 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
>
-------------------------------------------------------
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_ide95&alloc_id396&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development