<div style="font-family:arial,helvetica,sans-serif;font-size:12pt;"><font name="wm_default_font" style="position: relative;" face="arial,helvetica,sans-serif" size="3"><div>Hi,<br><br>I have the following JSP (selectone.jsp), containing a single selectOneMenu component:<br><br>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;<br>&lt;%@ page language="java" contentType="text/html; charset=UTF-8"<br>&nbsp;&nbsp;&nbsp; pageEncoding="UTF-8"%&gt;<br>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br>&lt;%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%&gt;<br>&lt;%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%&gt;<br>&lt;f:view&gt;<br>&nbsp;&nbsp;&nbsp; &lt;head&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;title&gt;Insert title here&lt;/title&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/head&gt;<br>&nbsp;&nbsp;&nbsp; &lt;body&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;h:form id="selectForm"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;h:selectOneMenu id="selectOne"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;f:selectItem itemValue="One" itemLabel="One"/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;f:selectItem itemValue="Two" itemLabel="Two"/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;f:selectItem itemValue="Three" itemLabel="Three"/&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/h:selectOneMenu&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/h:form&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/body&gt;<br>&lt;/f:view&gt;<br>&lt;/html&gt;<br><br>And the following test:<br><br>public class SelectTest extends TestCase {<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; public void testSelectOne() throws Exception {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ClientFacade client = new ClientFacade("/selectone.faces");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client.setParameter("selectOne", "One");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; client.submit("submit_button");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; assertEquals(200, client.getWebResponse().getResponseCode());<br>&nbsp;&nbsp;&nbsp; }<br><br>}<br><br>Running the test results in the following error:<br><br><code>com.meterware.httpunit.IllegalParameterValueException: May not
set parameter 'selectForm:selectOne' to 'One'. Value must be one of: { }<br>        at com.meterware.httpunit.SelectionFormControl$Options.reportNoMatches(FormControl.java:1186)<br>        at com.meterware.httpunit.SelectionFormControl$SingleSelectOptions.claimUniqueValues(FormControl.java:1360)<br>        at com.meterware.httpunit.SelectionFormControl$Options.claimUniqueValues(FormControl.java:1178)<br>        at com.meterware.httpunit.SelectionFormControl.claimUniqueValue(FormControl.java:1059)<br>        at com.meterware.httpunit.FormParameter.setValues(FormParameter.java:90)<br>        at com.meterware.httpunit.WebForm.setParameter(WebForm.java:612)<br>        at org.jboss.jsfunit.facade.ClientFacade.setParameter(ClientFacade.java:155)<br><br></code><font><font name="wm_default_font" style="position: relative;" face="arial,helvetica,sans-serif" size="3">It seems like HttpUnit does not correctly see the options for the select menu (hence the 'must be one of: { }).<br><br>Am I doing something wrong here or is this a bug?<br><br>Thanks,<br>Pieter.<br></font></font></div></font></div>