This is just a note for others head-butting the same problem.
I have the following code in my test:
tester.assertCheckboxPresent("aname", "avalue");
tester.checkCheckbox("aname", "avalue");
The (first line) assertion works fine, but the second fails with the result:
"caused an ERROR: No checkbox with name [aname] and value [avalue] was found
in the current form."
The issue is that assertCheckboxPresent
uses getTestingEngine().hasElementByXPath(..) to determine success whereas
the second iterates through the named input elements of the current form
checking each for type and value. This fails for me because I'm actually
interested in the /not first/ form of the page and unles you select a form
first with setWorkingForm(...) it only searchs the first form on the page.
My solution:
tester.setWorkingForm("aform");
tester.assertCheckboxPresent("aname", "avalue");
tester.checkCheckbox("aname", "avalue");
regards
Gible
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
JWebUnit-users mailing list
JWebUnit-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-users