I'm using the following code to assert the proper option is selected in a name="companyName" <select>:

assertFormElementEquals("startDate", formatter.format(startDate));
assertFormElementEquals("endDate", formatter.format(endDate));
assertFormElementPresent("companyName");
assertOptionEquals("companyName", "NSPP");


However, I'm getting:

[junit] expected:<NSPP> but was:<null>
[junit] junit.framework.ComparisonFailure: expected:<NSPP> but was:<null>
[junit] at net.sourceforge.jwebunit.WebTester.assertOptionEquals(WebTester.java: 538)
[junit] at net.sourceforge.jwebunit.WebTestCase.assertOptionEquals(WebTestCase.java :212)


If I do a view-source of this form in my browser - it all looks right:

<select name="companyName" id="companyName"><option value="">All</option>

<option value="NSPP" selected="selected">NSPP</option></select>

Thanks,

Matt



-------------------------------------------------------
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

Reply via email to